[space map disk] tidy up: add const qualifier
This commit is contained in:
parent
3439dbfdfc
commit
7eac48793c
@ -742,7 +742,7 @@ persistent_data::create_disk_sm(transaction_manager &tm,
|
||||
}
|
||||
|
||||
checked_space_map::ptr
|
||||
persistent_data::open_disk_sm(transaction_manager &tm, void *root)
|
||||
persistent_data::open_disk_sm(transaction_manager &tm, void const *root)
|
||||
{
|
||||
sm_root_disk d;
|
||||
sm_root v;
|
||||
@ -770,7 +770,7 @@ persistent_data::create_metadata_sm(transaction_manager &tm, block_address nr_bl
|
||||
}
|
||||
|
||||
checked_space_map::ptr
|
||||
persistent_data::open_metadata_sm(transaction_manager &tm, void *root)
|
||||
persistent_data::open_metadata_sm(transaction_manager &tm, void const *root)
|
||||
{
|
||||
sm_root_disk d;
|
||||
sm_root v;
|
||||
|
@ -29,13 +29,13 @@ namespace persistent_data {
|
||||
create_disk_sm(transaction_manager &tm, block_address nr_blocks);
|
||||
|
||||
checked_space_map::ptr
|
||||
open_disk_sm(transaction_manager &tm, void *root);
|
||||
open_disk_sm(transaction_manager &tm, void const *root);
|
||||
|
||||
checked_space_map::ptr
|
||||
create_metadata_sm(transaction_manager &tm, block_address nr_blocks);
|
||||
|
||||
checked_space_map::ptr
|
||||
open_metadata_sm(transaction_manager &tm, void *root);
|
||||
open_metadata_sm(transaction_manager &tm, void const *root);
|
||||
|
||||
bcache::validator::ptr bitmap_validator();
|
||||
|
||||
|
@ -9,7 +9,7 @@ using namespace thin_provisioning;
|
||||
|
||||
namespace {
|
||||
void count_trees(transaction_manager::ptr tm,
|
||||
superblock_detail::superblock &sb,
|
||||
superblock_detail::superblock const &sb,
|
||||
block_counter &bc) {
|
||||
|
||||
// Count the device tree
|
||||
@ -30,12 +30,12 @@ namespace {
|
||||
}
|
||||
|
||||
void count_space_maps(transaction_manager::ptr tm,
|
||||
superblock_detail::superblock &sb,
|
||||
superblock_detail::superblock const &sb,
|
||||
block_counter &bc) {
|
||||
// Count the metadata space map (no-throw)
|
||||
try {
|
||||
persistent_space_map::ptr metadata_sm =
|
||||
open_metadata_sm(*tm, static_cast<void *>(&sb.metadata_space_map_root_));
|
||||
open_metadata_sm(*tm, static_cast<void const *>(&sb.metadata_space_map_root_));
|
||||
metadata_sm->count_metadata(bc);
|
||||
} catch (std::exception &e) {
|
||||
cerr << e.what() << endl;
|
||||
@ -44,7 +44,7 @@ namespace {
|
||||
// Count the data space map (no-throw)
|
||||
{
|
||||
persistent_space_map::ptr data_sm =
|
||||
open_disk_sm(*tm, static_cast<void *>(&sb.data_space_map_root_));
|
||||
open_disk_sm(*tm, static_cast<void const *>(&sb.data_space_map_root_));
|
||||
data_sm->count_metadata(bc);
|
||||
}
|
||||
}
|
||||
@ -53,7 +53,7 @@ namespace {
|
||||
//----------------------------------------------------------------
|
||||
|
||||
void thin_provisioning::count_metadata(transaction_manager::ptr tm,
|
||||
superblock_detail::superblock &sb,
|
||||
superblock_detail::superblock const &sb,
|
||||
block_counter &bc,
|
||||
bool skip_metadata_snap) {
|
||||
// Count the superblock
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace thin_provisioning {
|
||||
void count_metadata(transaction_manager::ptr tm,
|
||||
superblock_detail::superblock &sb,
|
||||
superblock_detail::superblock const &sb,
|
||||
block_counter &bc,
|
||||
bool skip_metadata_snap = false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user