thin_dump.cc: fix metadata snapshot logic

This commit is contained in:
Heinz Mauelshagen 2013-07-30 15:31:36 +02:00
parent 38bab662b6
commit 78389803bc

View File

@ -44,12 +44,14 @@ namespace {
emitter::ptr e; emitter::ptr e;
uint64_t metadata_snap_root = md->sb_.metadata_snap_; /* FIXME: use thin_pool method? */ uint64_t metadata_snap_root = md->sb_.metadata_snap_; /* FIXME: use thin_pool method? */
if (metadata_snap_root) { if (flags.find_metadata_snap) {
md.reset(); if (metadata_snap_root) {
md = metadata::ptr(new metadata(path, metadata_snap_root)); md.reset();
} else if (flags.find_metadata_snap) { md = metadata::ptr(new metadata(path, metadata_snap_root));
cerr << "no metadata snapshot found!" << endl; } else {
exit(1); cerr << "no metadata snapshot found!" << endl;
exit(1);
}
} }
if (format == "xml") if (format == "xml")