]> git.baikalelectronics.ru Git - kernel.git/commit
blk-zoned: implement REQ_OP_ZONE_RESET_ALL
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 1 Aug 2019 17:26:36 +0000 (10:26 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Aug 2019 03:41:29 +0000 (21:41 -0600)
commitd021f39e2d67484cc6cd96748f055fcad070ac05
tree94c560cca9c4f000b07bdb21ec45b7a759778feb
parent72ff9af25eccb5d3bbac6693e67407b9a00440f8
blk-zoned: implement REQ_OP_ZONE_RESET_ALL

This implements REQ_OP_ZONE_RESET_ALL as a special case of the block
device zone reset operations where we just simply issue bio with the
newly introduced req op.

We issue this req op when the number of sectors is equal to the device's
partition's number of sectors and device has no partitions.

We also add support so that blk_op_str() can print the new reset-all
zone operation.

This patch also adds a generic make request check for newly
introduced REQ_OP_ZONE_RESET_ALL req_opf. We simply return error
when queue is zoned and reset-all flag is not set for
REQ_OP_ZONE_RESET_ALL.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-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>
block/blk-core.c
block/blk-zoned.c