[thin-check] wire up superblock-only and skip-mappings

This commit is contained in:
Joe Thornber
2013-05-23 11:25:54 +01:00
parent 6fe92d4a63
commit 8ccfff6c34
3 changed files with 71 additions and 24 deletions

View File

@ -131,11 +131,16 @@ namespace {
using namespace thin_provisioning;
using namespace mapping_tree_detail;
struct leaf_visitor {
struct block_time_visitor {
virtual void visit(btree_path const &, block_time const &) {
}
};
struct block_visitor {
virtual void visit(btree_path const &, uint64_t) {
}
};
class ll_damage_visitor {
public:
ll_damage_visitor(damage_visitor &v)
@ -163,12 +168,24 @@ namespace {
};
}
void
thin_provisioning::check_mapping_tree(dev_tree const &tree,
mapping_tree_detail::damage_visitor &visitor)
{
block_counter counter; // FIXME: get rid of this counter arg
block_visitor vv;
ll_damage_visitor dv(visitor);
btree_visit_values(tree, counter, vv, dv);
}
void
thin_provisioning::check_mapping_tree(mapping_tree const &tree,
mapping_tree_detail::damage_visitor &visitor)
{
block_counter counter; //FIXME: get rid of this counter arg
leaf_visitor vv;
block_time_visitor vv;
ll_damage_visitor dv(visitor);
btree_visit_values(tree, counter, vv, dv);