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 <path>

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Anand Jain 2020-06-12 01:41:20 +08:00 committed by David Sterba
parent 9326e1b99a
commit a70a1dbf98

View File

@ -769,6 +769,8 @@ static DEFINE_SIMPLE_COMMAND(balance_cancel, "cancel");
static const char * const cmd_balance_resume_usage[] = {
"btrfs balance resume <path>",
"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);