In Allocator::create() => ZonedAllocator::ZonedAllocator()
num_zones is calculated by size / zone_size,
causing a crash when zone_size is set to 0
Signed-off-by: Jrchyang Yu <yuzhiqiang_yewu@cmss.chinamobile.com>
(cherry picked from commit
4364ebdfa4a218a61528f7579e45233cc4725326)
cct, cct->_conf->bluestore_allocator,
bdev->get_conventional_region_size(),
alloc_size,
- 0, 0,
+ zone_size, 0,
"zoned_block");
if (!a) {
lderr(cct) << __func__ << " failed to create " << cct->_conf->bluestore_allocator