[thin_check] fix bugs in thin_check -m
This commit is contained in:
parent
ace8b39a8a
commit
0b5afc6cb0
@ -401,7 +401,8 @@ namespace {
|
||||
//----------------------------------------------------------------
|
||||
|
||||
check_options::check_options()
|
||||
: check_data_mappings_(DATA_MAPPING_LEVEL2),
|
||||
: use_metadata_snap_(false),
|
||||
check_data_mappings_(DATA_MAPPING_LEVEL2),
|
||||
sm_opts_(SPACE_MAP_FULL) {
|
||||
}
|
||||
|
||||
@ -420,6 +421,7 @@ void check_options::set_override_mapping_root(block_address b) {
|
||||
}
|
||||
|
||||
void check_options::set_metadata_snap() {
|
||||
use_metadata_snap_ = true;
|
||||
sm_opts_ = SPACE_MAP_NONE;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,8 @@ namespace {
|
||||
return 1;
|
||||
}
|
||||
|
||||
block_manager::ptr bm = open_bm(path);
|
||||
block_manager::ptr bm = open_bm(path, block_manager::READ_ONLY,
|
||||
!fs.check_opts.use_metadata_snap_);
|
||||
output_options output_opts = !fs.quiet ? OUTPUT_NORMAL : OUTPUT_QUIET;
|
||||
error_state err = check_metadata(bm, fs.check_opts, output_opts);
|
||||
|
||||
@ -128,7 +129,7 @@ thin_check_cmd::run(int argc, char **argv)
|
||||
int c;
|
||||
flags fs;
|
||||
|
||||
char const shortopts[] = "qhV";
|
||||
char const shortopts[] = "qhVm";
|
||||
option const longopts[] = {
|
||||
{ "quiet", no_argument, NULL, 'q'},
|
||||
{ "help", no_argument, NULL, 'h'},
|
||||
|
Loading…
Reference in New Issue
Block a user