From a70a1dbf98543e4d4fa5e96bc4beb011f20d3720 Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Fri, 12 Jun 2020 01:41:20 +0800 Subject: [PATCH] btrfs-progs: balance resume: add global quiet option Enable the quiet option to the balance resume command. Does the job quietly. For example: $ btrfs -q balance resume Signed-off-by: Anand Jain Signed-off-by: David Sterba --- cmds/balance.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmds/balance.c b/cmds/balance.c index 13ad64ad..0d6ca5f5 100644 --- a/cmds/balance.c +++ b/cmds/balance.c @@ -769,6 +769,8 @@ static DEFINE_SIMPLE_COMMAND(balance_cancel, "cancel"); static const char * const cmd_balance_resume_usage[] = { "btrfs balance resume ", "Resume interrupted balance", + HELPINFO_INSERT_GLOBALS, + HELPINFO_INSERT_QUIET, NULL }; @@ -817,9 +819,10 @@ static int cmd_balance_resume(const struct cmd_struct *cmd, ret = 1; } } 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); } close_file_or_dir(fd, dirstream);