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

View File

@ -1,6 +1,10 @@
.TH THIN_METADATA_SIZE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*- .TH THIN_METADATA_SIZE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
.SH NAME .SH NAME
<<<<<<< HEAD
thin_metadata_size \- thin provisioning metadata device/file size calculator. thin_metadata_size \- thin provisioning metadata device/file size calculator.
=======
thin_metadata_size \- thin provisioning metadata file/device size calculator.
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
.SH SYNOPSIS .SH SYNOPSIS
.B thin_metadata_size .B thin_metadata_size
@ -10,15 +14,24 @@ thin_metadata_size \- thin provisioning metadata device/file size calculator.
.B thin_metadata_size .B thin_metadata_size
calculates the size of the thin provisioning metadata based on the block 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 of the thin provisioned devices, the size of the thin provisioning pool and
<<<<<<< HEAD
the maximum number of all thin prisioned devices and snapshots. the maximum number of all thin prisioned devices and snapshots.
Because thin provisioning pools are holding widely variable contents, Because thin provisioning pools are holding widely variable contents,
this tool is needed to provide sensible initial default size. 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" .IP "\fB\-b, \-\-block-size\fP \fIBLOCKSIZE[bskKmMgGtTpPeEzZyY]\fP"
Block size of thin provisioned devices in units of bytes,sectors,kilobytes,kibibytes,... respectively. Block size of thin provisioned devices in units of bytes,sectors,kilobytes,kibibytes,... respectively.
Default is in sectors without a block size unit specifier. 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 Size/number option arguments can be followed by unit specifiers in short one character
and long form (eg. -b1m or -b1megabytes). and long form (eg. -b1m or -b1megabytes).
=======
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
.IP "\fB\-s, \-\-pool-size\fP \fIPOOLSIZE[bskKmMgGtTpPeEzZyY]\fP" .IP "\fB\-s, \-\-pool-size\fP \fIPOOLSIZE[bskKmMgGtTpPeEzZyY]\fP"
Thin provisioning pool size in units of bytes,sectors,kilobytes,kibibytes,... respectively. 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, int dump(string const &path, ostream *out, string const &format, struct flags &flags,
block_address metadata_snap = 0) { block_address metadata_snap = 0) {
try { try {
<<<<<<< HEAD
metadata::ptr md(new metadata(path, metadata_snap)); 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; emitter::ptr e;
uint64_t metadata_snap_root = md->sb_.metadata_snap_; uint64_t metadata_snap_root = md->sb_.metadata_snap_;
@ -77,7 +81,11 @@ namespace {
<< " {-h|--help}" << endl << " {-h|--help}" << endl
<< " {-f|--format} {xml|human_readable}" << endl << " {-f|--format} {xml|human_readable}" << endl
<< " {-r|--repair}" << endl << " {-r|--repair}" << endl
<<<<<<< HEAD
<< " {-m|--metadata-snap} [block#]" << endl << " {-m|--metadata-snap} [block#]" << endl
=======
<< " {-m|--metadata-snap} block#" << endl
>>>>>>> 9fac224f250ee2d6642d673d7d65afe346d68af5
<< " {-o <xml file>}" << endl << " {-o <xml file>}" << endl
<< " {-V|--version}" << endl; << " {-V|--version}" << endl;
} }