module/zone_block: don't align size to optimal open zones
There's no good reason to reduce the capacity by aligning it to the number of optimal open zones. If such alignment is required by the users of the zone block bdev, it should be done on their own layer. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ic8614a82715e9f064619aa8fdb75d1a0b851490c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7656 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
cf41deae8b
commit
a7c37873b4
@ -776,8 +776,6 @@ zone_block_register(const char *base_bdev_name)
|
||||
bdev_node->zone_shift = spdk_u64log2(zone_size);
|
||||
bdev_node->num_zones = base_bdev->blockcnt / zone_size;
|
||||
|
||||
/* Align num_zones to optimal_open_zones */
|
||||
bdev_node->num_zones -= bdev_node->num_zones % name->optimal_open_zones;
|
||||
bdev_node->zones = calloc(bdev_node->num_zones, sizeof(struct block_zone));
|
||||
if (!bdev_node->zones) {
|
||||
rc = -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user