Merge branch 'Work_1' of github.com:lvmguy/thin-provisioning-tools into Work_1

Conflicts:
	Makefile.in
	man8/thin_dump.8
	man8/thin_metadata_size.8
	thin-provisioning/thin_dump.cc
This commit is contained in:
Heinz Mauelshagen 2013-07-19 12:11:28 +02:00
commit d02bcbab56
3 changed files with 30 additions and 0 deletions

View File

@ -9,8 +9,12 @@ thin_dump \- dump thin provisioning metadata from device or file to standard out
.SH DESCRIPTION
.B thin_dump
<<<<<<< HEAD
dumps binary thin provisioning metadata (optionally from alternate block;
see option \-\-metadata-snap) created by the device-mapper
=======
dumps binary thin provisioning metadata created by the device-mapper
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
thin provisioning target on a device or file to standard output for
analysis or postprocessing in either XML or human readable format.
XML formated metadata can be fed into thin_restore (see
@ -23,12 +27,17 @@ Print output in XML or human readable format.
.IP "\fB\-r, \-\-repair\fP".
<<<<<<< HEAD
.IP "\fB\-m, \-\-metadata_snap\fP [block#]".
Dump metadata snapshot created by device-mapper thin provisioning target.
If block is not provided, access the default metadata snapshot created by
the thin provisioning device-mapper target, else try the one at block#.
See the thin provisioning target documentation on how to create or release
a metadata snapshot.
=======
.IP "\fB\-m, \-\-metadata_snap\fP block#".
Dump metadata snapshot at block#
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
.IP "\fB\-h, \-\-help\fP".
Print help and exit.

View File

@ -1,6 +1,10 @@
.TH THIN_METADATA_SIZE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
.SH NAME
<<<<<<< HEAD
thin_metadata_size \- thin provisioning metadata device/file size calculator.
=======
thin_metadata_size \- thin provisioning metadata file/device size calculator.
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
.SH SYNOPSIS
.B thin_metadata_size
@ -10,15 +14,24 @@ thin_metadata_size \- thin provisioning metadata device/file size calculator.
.B thin_metadata_size
calculates the size of the thin provisioning metadata based on the block size
of the thin provisioned devices, the size of the thin provisioning pool and
<<<<<<< HEAD
the maximum number of all thin prisioned devices and snapshots.
Because thin provisioning pools are holding widely variable contents,
this tool is needed to provide sensible initial default size.
=======
the maximum number of all thin prisioned devices and snapshots. Size/number
option arguments can be followed by unit specifiers in short one character
and long form (eg. -b1m or -b1megabytes).
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
.IP "\fB\-b, \-\-block-size\fP \fIBLOCKSIZE[bskKmMgGtTpPeEzZyY]\fP"
Block size of thin provisioned devices in units of bytes,sectors,kilobytes,kibibytes,... respectively.
Default is in sectors without a block size unit specifier.
<<<<<<< HEAD
Size/number option arguments can be followed by unit specifiers in short one character
and long form (eg. -b1m or -b1megabytes).
=======
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
.IP "\fB\-s, \-\-pool-size\fP \fIPOOLSIZE[bskKmMgGtTpPeEzZyY]\fP"
Thin provisioning pool size in units of bytes,sectors,kilobytes,kibibytes,... respectively.

View File

@ -40,7 +40,11 @@ namespace {
int dump(string const &path, ostream *out, string const &format, struct flags &flags,
block_address metadata_snap = 0) {
try {
<<<<<<< HEAD
metadata::ptr md(new metadata(path, metadata_snap));
=======
metadata::ptr md(metadata_snap ? new metadata(path, metadata_snap) : new metadata(path, metadata::OPEN, 0, 0));
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
emitter::ptr e;
uint64_t metadata_snap_root = md->sb_.metadata_snap_;
@ -77,7 +81,11 @@ namespace {
<< " {-h|--help}" << endl
<< " {-f|--format} {xml|human_readable}" << endl
<< " {-r|--repair}" << endl
<<<<<<< HEAD
<< " {-m|--metadata-snap} [block#]" << endl
=======
<< " {-m|--metadata-snap} block#" << endl
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
<< " {-o <xml file>}" << endl
<< " {-V|--version}" << endl;
}