summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2025-10-27 09:27:33 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-24 10:29:15 +0100
commit482b568e8680b089751fc0eae3456ca0ea7b9d9b (patch)
tree15ce9e49fb6dc476b6301b9cec0cc9bdc42e1895 /include/linux
parent37089e2258d6f9c8d370b0e48bd8a16681622026 (diff)
downloadlinux-482b568e8680b089751fc0eae3456ca0ea7b9d9b.tar.gz
linux-482b568e8680b089751fc0eae3456ca0ea7b9d9b.tar.bz2
linux-482b568e8680b089751fc0eae3456ca0ea7b9d9b.zip
block: make REQ_OP_ZONE_OPEN a write operation
commit 19de03b312d69a7e9bacb51c806c6e3f4207376c upstream. A REQ_OP_OPEN_ZONE request changes the condition of a sequential zone of a zoned block device to the explicitly open condition (BLK_ZONE_COND_EXP_OPEN). As such, it should be considered a write operation. Change this operation code to be an odd number to reflect this. The following operation numbers are changed to keep the numbering compact. No problems were reported without this change as this operation has no data. However, this unifies the zone operation to reflect that they modify the device state and also allows strengthening checks in the block layer, e.g. checking if this operation is not issued against a read-only device. Fixes: 6c1b1da58f8c ("block: add zone open, close and finish operations") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk_types.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index b05f14e450dc..d328b318e44b 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -384,15 +384,15 @@ enum req_op {
/* write the zero filled sector many times */
REQ_OP_WRITE_ZEROES = (__force blk_opf_t)9,
/* Open a zone */
- REQ_OP_ZONE_OPEN = (__force blk_opf_t)10,
+ REQ_OP_ZONE_OPEN = (__force blk_opf_t)11,
/* Close a zone */
- REQ_OP_ZONE_CLOSE = (__force blk_opf_t)11,
+ REQ_OP_ZONE_CLOSE = (__force blk_opf_t)13,
/* Transition a zone to full */
- REQ_OP_ZONE_FINISH = (__force blk_opf_t)13,
+ REQ_OP_ZONE_FINISH = (__force blk_opf_t)15,
/* reset a zone write pointer */
- REQ_OP_ZONE_RESET = (__force blk_opf_t)15,
+ REQ_OP_ZONE_RESET = (__force blk_opf_t)17,
/* reset all the zone present on the device */
- REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)17,
+ REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)19,
/* Driver private requests */
REQ_OP_DRV_IN = (__force blk_opf_t)34,