summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2025-10-27 03:27:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-24 12:29:15 +0300
commit37089e2258d6f9c8d370b0e48bd8a16681622026 (patch)
tree16cf57fd7d80b64cf10b246266ebba748e494a46 /include
parent02a16148f842db78c4304873cbc788f0d7d7c55a (diff)
downloadlinux-37089e2258d6f9c8d370b0e48bd8a16681622026.tar.xz
block: fix op_is_zone_mgmt() to handle REQ_OP_ZONE_RESET_ALL
commit 12a1c9353c47c0fb3464eba2d78cdf649dee1cf7 upstream. REQ_OP_ZONE_RESET_ALL is a zone management request. Fix op_is_zone_mgmt() to return true for that operation, like it already does for REQ_OP_ZONE_RESET. While no problems were reported without this fix, this change allows strengthening checks in various block device drivers (scsi sd, virtioblk, DM) where op_is_zone_mgmt() is used to verify that a zone management command is not being issued to a regular block 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')
-rw-r--r--include/linux/blk_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index b9c0b3281ace..b05f14e450dc 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -517,6 +517,7 @@ static inline bool op_is_zone_mgmt(enum req_op op)
{
switch (op & REQ_OP_MASK) {
case REQ_OP_ZONE_RESET:
+ case REQ_OP_ZONE_RESET_ALL:
case REQ_OP_ZONE_OPEN:
case REQ_OP_ZONE_CLOSE:
case REQ_OP_ZONE_FINISH: