[thin_repair, metadata] Try harder to get the number of data blocks

when opening the metadata.
This commit is contained in:
Joe Thornber
2016-03-21 17:17:57 +00:00
parent a21f97e405
commit b0e2d0e6a0
2 changed files with 22 additions and 12 deletions

View File

@@ -24,11 +24,7 @@ namespace {
block_manager<>::ptr old_bm = open_bm(old_path, block_manager<>::READ_ONLY);
// we need to read the space maps to get the size
// of the data device. This is a shame, since any
// corruption in the sms will cause the repair to
// fail.
metadata::ptr old_md(new metadata(old_bm, true));
metadata::ptr old_md(new metadata(old_bm, false));
metadata_dump(old_md, e, true);
} catch (std::exception &e) {