[PATCH 4/6] block: also reject zone open / close on conventional zones

Christoph Hellwig <[email protected]> Thu, 16 Jul 2026 11:17:50 +0200
Newsgroups org.kernel.vger.io-uring,org.kernel.vger.linux-block
Message-ID <[email protected]>
Just like zone reset / finish, these only apply to sequential zones.

Signed-off-by: Christoph Hellwig <[email protected]>
---
 block/blk-core.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 67cfd7bd8542..196bccf27f58 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -897,17 +897,14 @@ void submit_bio_noacct(struct bio *bio)
 		if (!q->limits.max_write_zeroes_sectors)
 			goto not_supported;
 		break;
+	case REQ_OP_ZONE_OPEN:
+	case REQ_OP_ZONE_CLOSE:
 	case REQ_OP_ZONE_RESET:
 	case REQ_OP_ZONE_FINISH:
-		/*
-		 * Zone reset and zone finish operations do not apply to
-		 * conventional zones.
-		 */
+		/* Zone management operations require sequential zones. */
 		if (!bdev_zone_is_seq(bio->bi_bdev, bio->bi_iter.bi_sector))
 			goto end_io;
 		break;
-	case REQ_OP_ZONE_OPEN:
-	case REQ_OP_ZONE_CLOSE:
 	case REQ_OP_ZONE_RESET_ALL:
 		if (!bdev_is_zoned(bio->bi_bdev))
 			goto not_supported;
-- 
2.53.0