]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: make REQ_OP_ZONE_OPEN a write operation
authorDamien Le Moal <dlemoal@kernel.org>
Mon, 27 Oct 2025 00:27:33 +0000 (09:27 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 28 Oct 2025 13:52:55 +0000 (07:52 -0600)
commit19de03b312d69a7e9bacb51c806c6e3f4207376c
tree2be8d8cf7bf946017270f99a856a77eb79339c7a
parent12a1c9353c47c0fb3464eba2d78cdf649dee1cf7
block: make REQ_OP_ZONE_OPEN a write operation

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>
include/linux/blk_types.h