According to BlueFS::_init_alloc(), if the relevant bdev
does not exist, we will skip initializing the corresponding
allocator too.
So below here we shall check the existence of the specific
allocator instead.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
block_all[id].insert(offset, length);
block_total[id] += length;
- if (alloc.size()) {
+ if (id < alloc.size() && alloc[id]) {
log_t.op_alloc_add(id, offset, length);
int r = _flush_and_sync_log(l);
assert(r == 0);