thin_dump: cleanup metadata snapshot support

This commit is contained in:
Heinz Mauelshagen 2013-07-30 17:10:41 +02:00
parent 78389803bc
commit bdb8d6e5cc
2 changed files with 3 additions and 6 deletions

View File

@ -148,7 +148,7 @@ metadata::metadata(std::string const &dev_path, block_address metadata_snap)
// We don't open the metadata sm for a held root
//metadata_sm_ = open_metadata_sm(tm_, &sb_.metadata_space_map_root_);
tm_->set_sm(metadata_sm_);
//tm_->set_sm(metadata_sm_);
data_sm_ = open_disk_sm(tm_, static_cast<void *>(&sb_.data_space_map_root_));
details_ = device_tree::ptr(new device_tree(tm_, sb_.device_details_root_, device_tree_detail::device_details_traits::ref_counter()));

View File

@ -42,9 +42,10 @@ namespace {
try {
metadata::ptr md(new metadata(path, metadata_snap));
emitter::ptr e;
uint64_t metadata_snap_root = md->sb_.metadata_snap_; /* FIXME: use thin_pool method? */
if (flags.find_metadata_snap) {
uint64_t metadata_snap_root = md->sb_.metadata_snap_; /* FIXME: use thin_pool method? */
if (metadata_snap_root) {
md.reset();
md = metadata::ptr(new metadata(path, metadata_snap_root));
@ -119,10 +120,6 @@ int main(int argc, char **argv)
flags.repair = true;
break;
case 's':
flags.find_metadata_snap = true;
break;
case 'm':
if (optarg) {
metadata_snap = strtoull(optarg, &end_ptr, 10);