[thin_repair] fix regression in thin_repair
When opening the corrupted metadata we don't need to touch the space maps. This used to be achieved by pretending we were opening a metadata snap at block 0 (superblock location). But got changed in the recent rationalisation of the metadata constructors. This patch introduces a bool to the metadata OPEN constructor that says whether the space maps are needed or not.
This commit is contained in:
@@ -112,12 +112,14 @@ metadata::metadata(block_manager<>::ptr bm, open_type ot,
|
||||
}
|
||||
}
|
||||
|
||||
metadata::metadata(block_manager<>::ptr bm)
|
||||
metadata::metadata(block_manager<>::ptr bm, bool read_space_maps)
|
||||
{
|
||||
tm_ = open_tm(bm);
|
||||
sb_ = read_superblock(tm_->get_bm(), SUPERBLOCK_LOCATION);
|
||||
|
||||
open_space_maps();
|
||||
if (read_space_maps)
|
||||
open_space_maps();
|
||||
|
||||
open_btrees();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user