]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
commit6e33dbf280d60db8c1c11dbf99c0bc475946f9c8
tree94c560cca9c4f000b07bdb21ec45b7a759778feb
parente84e8f0663956f45c747df5629046794cff93893
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