From: David Sterba <dsterba@suse.cz>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.cz>
Subject: [PATCH] btrfs-progs: convert, add long options for all short options
Date: Tue, 24 Mar 2015 19:16:56 +0100 [thread overview]
Message-ID: <1427221016-28178-1-git-send-email-dsterba@suse.cz> (raw)
Signed-off-by: David Sterba <dsterba@suse.cz>
---
Documentation/btrfs-convert.txt | 21 +++++++++++----------
btrfs-convert.c | 27 ++++++++++++++++++---------
2 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/Documentation/btrfs-convert.txt b/Documentation/btrfs-convert.txt
index 89b2fbd978e2..8b3f05b40ace 100644
--- a/Documentation/btrfs-convert.txt
+++ b/Documentation/btrfs-convert.txt
@@ -17,23 +17,24 @@ named 'ext2_saved' as file image.
OPTIONS
-------
--d::
-Disable data checksum.
--i::
+-d|--no-datasum::
+Disable data checksum calculations and set NODATASUM file flag. This can speed
+up the conversion.
+-i|--no-xattr::
Ignore xattrs and ACLs.
--n::
-Disable packing of small files.
--N <SIZE>::
+-n|--no-inline::
+Disable inlining of small files to metadata blocks.
+-N|--nodesize <SIZE>::
Set filesystem nodesize, the tree block size in which btrfs stores data.
The default value is 16KB (16384) or the page size, whichever is bigger.
Must be a multiple of the sectorsize, but not larger than 65536.
--r::
+-r|--rollback::
Roll back to ext2fs.
--l <LABEL>::
+-l|--label <LABEL>::
set filesystem label during conversion.
--L::
+-L|--copy-label::
use label from the converted filesystem.
--p::
+-p|--progress::
Show progress of conversion, on by default.
--no-progress::
Disable detailed progress and show only the main phases of conversion.
diff --git a/btrfs-convert.c b/btrfs-convert.c
index ff8a959f6fa1..4dc33b3c03a4 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -2800,15 +2800,16 @@ fail:
static void print_usage(void)
{
printf("usage: btrfs-convert [options] device\n");
- printf("\t-d disable data checksum\n");
- printf("\t-i ignore xattrs and ACLs\n");
- printf("\t-n disable packing of small files\n");
- printf("\t-N SIZE set filesystem nodesize\n");
- printf("\t-r roll back to ext2fs\n");
- printf("\t-l LABEL set filesystem label\n");
- printf("\t-L use label from converted fs\n");
- printf("\t-p show converting progress (default)\n");
- printf("\t--no-progress show only overview, not the detailed progress\n");
+ printf("options:\n");
+ printf("\t-d|--no-datasum disable data checksum, sets NODATASUM\n");
+ printf("\t-i|--no-xattr ignore xattrs and ACLs\n");
+ printf("\t-n|--no-inline disable inlining of small files to metadata\n");
+ printf("\t-N|--nodesize SIZE set filesystem metadata nodesize\n");
+ printf("\t-r|--rollback roll back to ext2fs\n");
+ printf("\t-l|--label LABEL set filesystem label\n");
+ printf("\t-L|--copy-label use label from converted filesystem\n");
+ printf("\t-p|--progress show converting progress (default)\n");
+ printf("\t--no-progress show only overview, not the detailed progress\n");
}
int main(int argc, char *argv[])
@@ -2832,6 +2833,14 @@ int main(int argc, char *argv[])
static const struct option long_options[] = {
{ "no-progress", no_argument, NULL,
GETOPT_VAL_NO_PROGRESS },
+ { "no-datasum", no_argument, NULL, 'd' },
+ { "no-inline", no_argument, NULL, 'n' },
+ { "no-xattr", no_argument, NULL, 'i' },
+ { "rollback", no_argument, NULL, 'r' },
+ { "progress", no_argument, NULL, 'p' },
+ { "label", required_argument, NULL, 'l' },
+ { "copy-label", no_argument, NULL, 'L' },
+ { "nodesize", required_argument, NULL, 'N' },
{ NULL, 0, NULL, 0 }
};
int c = getopt_long(argc, argv, "dinN:rl:Lp", long_options,
--
2.1.3
reply other threads:[~2015-03-24 18:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427221016-28178-1-git-send-email-dsterba@suse.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).