Move block_manager member down into checker base class.
This commit is contained in:
parent
1a8b1b29e8
commit
6422b22610
@ -5,7 +5,7 @@ using namespace thin_provisioning;
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
device_checker::device_checker(block_manager::ptr bm)
|
device_checker::device_checker(block_manager::ptr bm)
|
||||||
: bm_(bm)
|
: checker(bm)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,10 +10,6 @@ namespace thin_provisioning {
|
|||||||
public:
|
public:
|
||||||
device_checker(block_manager::ptr bm);
|
device_checker(block_manager::ptr bm);
|
||||||
damage_list_ptr check();
|
damage_list_ptr check();
|
||||||
|
|
||||||
private:
|
|
||||||
block_manager::ptr bm_;
|
|
||||||
damage_list_ptr damage_;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,6 +165,13 @@ metadata_damage_visitor::visit(metadata_damage const &damage)
|
|||||||
damage.visit(*this);
|
damage.visit(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------
|
||||||
|
|
||||||
|
checker::checker(block_manager::ptr bm)
|
||||||
|
: bm_(bm)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -156,8 +156,13 @@ namespace thin_provisioning {
|
|||||||
typedef persistent_data::block_manager<> block_manager;
|
typedef persistent_data::block_manager<> block_manager;
|
||||||
typedef boost::shared_ptr<checker> ptr;
|
typedef boost::shared_ptr<checker> ptr;
|
||||||
|
|
||||||
|
checker(block_manager::ptr bm);
|
||||||
|
|
||||||
virtual ~checker() {};
|
virtual ~checker() {};
|
||||||
virtual damage_list_ptr check() = 0;
|
virtual damage_list_ptr check() = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
block_manager::ptr bm_;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,8 +9,7 @@ using namespace thin_provisioning;
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
superblock_checker::superblock_checker(block_manager::ptr bm)
|
superblock_checker::superblock_checker(block_manager::ptr bm)
|
||||||
: bm_(bm),
|
: checker(bm)
|
||||||
damage(new damage_list)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,11 +10,6 @@ namespace thin_provisioning {
|
|||||||
public:
|
public:
|
||||||
superblock_checker(block_manager::ptr bm);
|
superblock_checker(block_manager::ptr bm);
|
||||||
damage_list_ptr check();
|
damage_list_ptr check();
|
||||||
|
|
||||||
private:
|
|
||||||
// FIXME: surely we can push these down to the base class?
|
|
||||||
block_manager::ptr bm_;
|
|
||||||
damage_list_ptr damage;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user