@@ -14,6 +14,11 @@ DESCRIPTION
*btrfs-image* is used to create an image of a btrfs filesystem.
All data will be zeroed, but metadata and the like is preserved.
+Without '-r' option, <source> is the device/normal file containing the btrfs,
+and <target> is the output image file, or standard output if <target> is '-'.
+With '-r' option, <source> is the dump image file and <target> is the
+device/normal file where the restored fs lies.
+
Mainly used for debug purpose.
OPTIONS
@@ -2459,6 +2459,8 @@ out:
static void print_usage(void)
{
fprintf(stderr, "usage: btrfs-image [options] source target\n");
+ fprintf(stderr, "Without '-r' source is the btrfs fs and target is output image('-' for stdout)\n");
+ fprintf(stderr, "With '-r' source is the dumped image and target is the btrfs fs\n");
fprintf(stderr, "\t-r \trestore metadump image\n");
fprintf(stderr, "\t-c value\tcompression level (0 ~ 9)\n");
fprintf(stderr, "\t-t value\tnumber of threads (1 ~ 32)\n");
Add explain on 'source' and 'target', which is somewhat confusing for users who want to restore dumped image. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> --- Documentation/btrfs-image.txt | 5 +++++ btrfs-image.c | 2 ++ 2 files changed, 7 insertions(+)