diff mbox

btrfs-progs: convert: show progress by default

Message ID 1425051165-23376-1-git-send-email-dsterba@suse.cz (mailing list archive)
State Accepted
Headers show

Commit Message

David Sterba Feb. 27, 2015, 3:32 p.m. UTC
Agreed by several people, showing progress by default makes sense as
conversion is a one-time and long running action.

Signed-off-by: David Sterba <dsterba@suse.cz>
---
 Documentation/btrfs-convert.txt | 2 +-
 btrfs-convert.c                 | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Jérôme Poulin March 4, 2015, 6:21 a.m. UTC | #1
On Fri, Feb 27, 2015 at 10:32 AM, David Sterba <dsterba@suse.cz> wrote:
>
> +       printf("\t-p           show converting progress (default)\n");

A quick look a this it looks like you've added a mandatory «option»
since the "case" which handle -p can only turn on this flag. Logic
should be switched to -q for quiet mode instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Sterba March 9, 2015, 11 a.m. UTC | #2
On Wed, Mar 04, 2015 at 01:21:02AM -0500, Jérôme Poulin wrote:
> On Fri, Feb 27, 2015 at 10:32 AM, David Sterba <dsterba@suse.cz> wrote:
> >
> > +       printf("\t-p           show converting progress (default)\n");
> 
> A quick look a this it looks like you've added a mandatory «option»
> since the "case" which handle -p can only turn on this flag. Logic
> should be switched to -q for quiet mode instead.

I'll add an option to disable the progress, that'd still print the main
phases like before. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/btrfs-convert.txt b/Documentation/btrfs-convert.txt
index e508c34b4f66..170919706e71 100644
--- a/Documentation/btrfs-convert.txt
+++ b/Documentation/btrfs-convert.txt
@@ -30,7 +30,7 @@  set filesystem label during conversion.
 -L::
 use label from the converted filesystem.
 -p::
-Show progress of conversion.
+Show progress of conversion, on by default.
 
 EXIT STATUS
 -----------
diff --git a/btrfs-convert.c b/btrfs-convert.c
index da10ad668ea6..730fead4a86c 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -2759,14 +2759,14 @@  fail:
 
 static void print_usage(void)
 {
-	printf("usage: btrfs-convert [-d] [-i] [-n] [-r] [-l label] [-L] device\n");
+	printf("usage: btrfs-convert [-d] [-i] [-n] [-r] [-l label] [-L] [-p] 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-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\n");
+	printf("\t-p           show converting progress (default)\n");
 }
 
 int main(int argc, char *argv[])
@@ -2778,7 +2778,7 @@  int main(int argc, char *argv[])
 	int rollback = 0;
 	int copylabel = 0;
 	int usage_error = 0;
-	int progress = 0;
+	int progress = 1;
 	char *file;
 	char *fslabel = NULL;