null_blk: Add conventional zone configuration for zoned support
authorMasato Suzuki <masato.suzuki@wdc.com>
Tue, 30 Oct 2018 07:14:05 +0000 (16:14 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2018 20:41:50 +0000 (13:41 -0700)
commitea2c18e1044e9ed8f780c965c50432060ab0e355
tree0dc4b8f9ffc8593df1e4f788d203ba882e3f324f
parent85758777c2a227fd1541b6dd122a08ab79c347ce
null_blk: Add conventional zone configuration for zoned support

Allow the creation of conventional zones by adding the zone_nr_conv
configuration attribute. This new attribute is used only for zoned devices
and indicates the number of conventional zones to create. The default value
is 0. Since host-managed zoned block devices must always have at least one
sequential zone, if the value of zone_nr_conv is larger than or equal to
the total number of zones of the device nr_zones, zone_nr_conv is
automatically changed to nr_zones - 1.

Reviewed-by: Matias Bjorling <matias.bjorling@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk.h
drivers/block/null_blk_main.c
drivers/block/null_blk_zoned.c