mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 22:09:30 +02:00
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 <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://patch.msgid.link/20260804125038.740388-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
f3dfaf68ea
commit
13270876ce
+3
-6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user