[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:
@@ -23,7 +23,7 @@ namespace {
|
||||
emitter::ptr e = create_restore_emitter(new_md);
|
||||
|
||||
block_manager<>::ptr old_bm = open_bm(old_path, block_manager<>::READ_ONLY);
|
||||
metadata::ptr old_md(new metadata(old_bm));
|
||||
metadata::ptr old_md(new metadata(old_bm, false)); // we don't need to read the space maps
|
||||
metadata_dump(old_md, e, true);
|
||||
|
||||
} catch (std::exception &e) {
|
||||
|
||||
Reference in New Issue
Block a user