[thin-provisioning] Add a new constructor for the metadata class
This one takes a superblock. Used when repairing.
This commit is contained in:
parent
b777a77023
commit
b027a1039f
@ -134,6 +134,13 @@ metadata::metadata(block_manager<>::ptr bm,
|
||||
open_btrees();
|
||||
}
|
||||
|
||||
metadata::metadata(block_manager<>::ptr bm, superblock_detail::superblock const &sb)
|
||||
{
|
||||
tm_ = open_tm(bm, SUPERBLOCK_LOCATION);
|
||||
sb_ = sb;
|
||||
open_btrees();
|
||||
}
|
||||
|
||||
void
|
||||
metadata::commit()
|
||||
{
|
||||
|
@ -78,6 +78,9 @@ namespace thin_provisioning {
|
||||
metadata(block_manager<>::ptr,
|
||||
boost::optional<block_address> metadata_snap); // (ii) and (iii)
|
||||
|
||||
// This is used by repair, when we rebuild the superblock
|
||||
metadata(block_manager<>::ptr bm, superblock_detail::superblock const &sb);
|
||||
|
||||
void commit();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user