name += devnames[id];
else
name += to_string(uintptr_t(this));
+ string alloc_type = cct->_conf->bluefs_allocator;
+
dout(1) << __func__ << " new, id " << id << std::hex
<< ", allocator name " << name
- << ", allocator type " << cct->_conf->bluefs_allocator
+ << ", allocator type " << alloc_type
<< ", capacity 0x" << bdev[id]->get_size()
<< ", reserved 0x" << block_reserved[id]
<< ", block size 0x" << alloc_size[id]
<< std::dec << dendl;
- alloc[id] = Allocator::create(cct, cct->_conf->bluefs_allocator,
+ alloc[id] = Allocator::create(cct, alloc_type,
bdev[id]->get_size(),
alloc_size[id],
name);
void BlueFS::collect_metadata(map<string,string> *pm, unsigned skip_bdev_id)
{
- if (skip_bdev_id != BDEV_DB && bdev[BDEV_DB])
+ if (skip_bdev_id != BDEV_DB && bdev[BDEV_DB]) {
bdev[BDEV_DB]->collect_metadata("bluefs_db_", pm);
- if (bdev[BDEV_WAL])
+ (*pm)["bluefs_db_allocator"]= alloc[BDEV_DB] ? alloc[BDEV_DB]->get_type(): "null";
+ }
+ if (bdev[BDEV_WAL]) {
bdev[BDEV_WAL]->collect_metadata("bluefs_wal_", pm);
+ (*pm)["bluefs_wal_allocator"]= alloc[BDEV_WAL] ? alloc[BDEV_WAL]->get_type(): "null";
+ }
}
void BlueFS::get_devices(set<string> *ls)