[metadata_checker] Rename function to reflect command line changes

This commit is contained in:
Ming-Hung Tsai 2020-08-12 23:25:24 +08:00
parent 7466cd7182
commit 9f3823c97d
3 changed files with 5 additions and 5 deletions

View File

@ -603,8 +603,9 @@ void check_options::set_ignore_non_fatal() {
ignore_non_fatal_ = true;
}
void check_options::set_fix_metadata_leaks() {
void check_options::set_auto_repair() {
fix_metadata_leaks_ = true;
clear_needs_check_ = true;
}
void check_options::set_clear_needs_check() {
@ -650,8 +651,7 @@ thin_provisioning::check_metadata(std::string const &path,
checker.check();
if (check_opts.fix_metadata_leaks_)
checker.fix_metadata_leaks(check_opts.open_transaction_);
if (check_opts.fix_metadata_leaks_ ||
check_opts.clear_needs_check_)
if (check_opts.clear_needs_check_)
checker.clear_needs_check_flag();
return checker.get_status();

View File

@ -45,7 +45,7 @@ namespace thin_provisioning {
void set_override_mapping_root(bcache::block_address b);
void set_metadata_snap();
void set_ignore_non_fatal();
void set_fix_metadata_leaks();
void set_auto_repair();
void set_clear_needs_check();
bool use_metadata_snap_;

View File

@ -166,7 +166,7 @@ thin_check_cmd::run(int argc, char **argv)
case 6:
// auto-repair
fs.check_opts.set_fix_metadata_leaks();
fs.check_opts.set_auto_repair();
break;
default: