From 13270876ce4eab47a218f31f0081885639011bb9 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 4 Aug 2026 05:50:20 -0700 Subject: [PATCH] block: also reject zone open / close on conventional zones Just like zone reset / finish, these only apply to sequential zones. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/20260804125038.740388-5-hch@lst.de Signed-off-by: Jens Axboe --- 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;