From f85b7cef3fddee1411e2e49ad0a6b9ec12fd4012 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Fri, 3 Jul 2015 13:00:13 +0100 Subject: [PATCH] thin_dump, thin_check: Fix bug in damage reporting --- thin-provisioning/mapping_tree.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/thin-provisioning/mapping_tree.cc b/thin-provisioning/mapping_tree.cc index 421c8fe..454e85c 100644 --- a/thin-provisioning/mapping_tree.cc +++ b/thin-provisioning/mapping_tree.cc @@ -178,6 +178,10 @@ namespace { v_.visit(missing_devices(d.desc_, d.lost_keys_)); break; + case 1: + v_.visit(missing_mappings(d.desc_, path[0], d.lost_keys_)); + break; + default: throw std::runtime_error("mapping_tree_damage_visitor: path too long"); } @@ -196,7 +200,7 @@ namespace { virtual void visit(btree_path const &path, btree_detail::damage const &d) { switch (path.size()) { case 0: - v_.visit(missing_mappings(d.desc_, path[0], d.lost_keys_)); + v_.visit(missing_devices(d.desc_, d.lost_keys_)); break; default: