[metadata_checker] Do not update the superblock if the needs_check flag is not set

This commit is contained in:
Ming-Hung Tsai 2020-08-07 01:06:46 +08:00
parent 3f19818c56
commit 2d9eaa1c56

View File

@ -449,6 +449,10 @@ namespace {
block_manager::ptr bm = open_bm(path_, block_manager::READ_WRITE);
superblock_detail::superblock sb = read_superblock(bm);
if (!sb.get_needs_check_flag())
return true;
sb.set_needs_check_flag(false);
write_superblock(bm, sb);