]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: don't allow discard for zoned mode
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Wed, 20 May 2020 23:01:52 +0000 (16:01 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 May 2020 14:47:28 +0000 (08:47 -0600)
commit55155d66f9dce1ba54356be373625e3b6cb872a8
treeba66c62d973854ef2db95a22132bfe81d83b901a
parent356279da8c475dfeb024086ae5ba92633d638860
null_blk: don't allow discard for zoned mode

Zoned block device specification do not define the behavior of
discard/trim command as this command is generally replaced by the reset
write pointer (zone reset) command. Emulate this in null_blk by making
zoned and discard options mutually exclusive.

Suggested-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk_main.c