Add "external" bitmap support to the secondary OSD protocol

This commit is contained in:
Vitaliy Filippov
2021-04-10 17:44:12 +03:00
parent 6107a4d07b
commit 860ac24762
11 changed files with 70 additions and 15 deletions
+10 -4
View File
@@ -12,7 +12,16 @@
osd_t::osd_t(blockstore_config_t & config, ring_loop_t *ringloop)
{
config["entry_attr_size"] = "0";
bs_block_size = strtoull(config["block_size"].c_str(), NULL, 10);
bs_bitmap_granularity = strtoull(config["bitmap_granularity"].c_str(), NULL, 10);
if (!bs_block_size)
bs_block_size = DEFAULT_BLOCK_SIZE;
if (!bs_bitmap_granularity)
bs_bitmap_granularity = DEFAULT_BITMAP_GRANULARITY;
// Force external bitmap size
entry_attr_size = bs_block_size / bs_bitmap_granularity / 8;
config["entry_attr_size"] = entry_attr_size;
this->config = config;
this->ringloop = ringloop;
@@ -20,9 +29,6 @@ osd_t::osd_t(blockstore_config_t & config, ring_loop_t *ringloop)
// FIXME: Create Blockstore from on-disk superblock config and check it against the OSD cluster config
this->bs = new blockstore_t(config, ringloop);
this->bs_block_size = bs->get_block_size();
this->bs_bitmap_granularity = bs->get_bitmap_granularity();
parse_config(config);
epmgr = new epoll_manager_t(ringloop);