From 9326e1b99a899774f0da41f4b4a5b6895577b37e Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Fri, 12 Jun 2020 01:41:19 +0800 Subject: [PATCH] btrfs-progs: balance start: add global quiet option Enable the quiet option to the balance start command. Does the job quietly. For example: $ btrfs -q balance start --full-balance Signed-off-by: Anand Jain Signed-off-by: David Sterba --- cmds/balance.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmds/balance.c b/cmds/balance.c index b35d90dc..13ad64ad 100644 --- a/cmds/balance.c +++ b/cmds/balance.c @@ -470,9 +470,10 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args, } else if (ret > 0) { error("balance: %s", btrfs_err_str(ret)); } else { - printf("Done, had to relocate %llu out of %llu chunks\n", - (unsigned long long)args->stat.completed, - (unsigned long long)args->stat.considered); + pr_verbose(MUST_LOG, + "Done, had to relocate %llu out of %llu chunks\n", + (unsigned long long)args->stat.completed, + (unsigned long long)args->stat.considered); } out: @@ -501,6 +502,7 @@ static const char * const cmd_balance_start_usage[] = { " run the balance as a background process", HELPINFO_INSERT_GLOBALS, HELPINFO_INSERT_VERBOSE, + HELPINFO_INSERT_QUIET, NULL };