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 <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Christoph Hellwig authored and Jens Axboe committed 2026-08-04 06:55:31 -06:00
1 parent f3dfaf68ea
commit 13270876ce
1 file changed
+3 -6
+3 -6
View File
@@ -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;