mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01: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 <[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:
1 parent
f3dfaf68ea
commit
13270876ce
1 file changed
+3
-6
+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