null_blk: fix zone size paramter check
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 3 Dec 2019 09:39:01 +0000 (10:39 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Dec 2019 15:51:24 +0000 (08:51 -0700)
commit5c4bd1f40c23d08ffbdccd68a5fd63751c794d89
tree20b405541c6e1b71dd27c60105d067fa3a76cea2
parent795ee49c1a28d1b3eeb2b463f18d557700fc6153
null_blk: fix zone size paramter check

For zoned=1 mode, the zone size must be a power of 2. Check this not
only when the zone size is specified during modprobe, but also when
creating a zoned null_blk device using configfs.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk_main.c