summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2026-08-04 05:50:19 -0700
committerJens Axboe <axboe@kernel.dk>2026-08-04 06:55:31 -0600
commitf3dfaf68ea3691a388dcd4c86c249f4544cfa898 (patch)
tree1412b3627839f5261f6496e0d41cae57d9ccea1d
parent9451934953bf1a4cc8e88179082785f3de5e127a (diff)
block: remove blk_zone_wplug_handle_zone_mgmt
blk_zone_wplug_handle_zone_mgmt now only checks that zone reset and zone finish operations are directed to a sequential write required zone. This has nothing to do with zone write plugs and is better handled with other bio validity checks in submit_bio_noacct. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://patch.msgid.link/20260804125038.740388-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/blk-core.c9
-rw-r--r--block/blk-zoned.c19
2 files changed, 8 insertions, 20 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 365641266c9e..67cfd7bd8542 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -898,9 +898,16 @@ void submit_bio_noacct(struct bio *bio)
goto not_supported;
break;
case REQ_OP_ZONE_RESET:
+ case REQ_OP_ZONE_FINISH:
+ /*
+ * Zone reset and zone finish operations do not apply to
+ * conventional 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_FINISH:
case REQ_OP_ZONE_RESET_ALL:
if (!bdev_is_zoned(bio->bi_bdev))
goto not_supported;
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 3b7a5f2bdf98..a5afb842bf35 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -1574,21 +1574,6 @@ static void blk_zone_wplug_handle_native_zone_append(struct bio *bio)
disk_put_zone_wplug(zwplug);
}
-static bool blk_zone_wplug_handle_zone_mgmt(struct bio *bio)
-{
- if (bio_op(bio) != REQ_OP_ZONE_RESET_ALL &&
- !bdev_zone_is_seq(bio->bi_bdev, bio->bi_iter.bi_sector)) {
- /*
- * Zone reset and zone finish operations do not apply to
- * conventional zones.
- */
- bio_io_error(bio);
- return true;
- }
-
- return false;
-}
-
/**
* blk_zone_plug_bio - Handle a zone write BIO with zone write plugging
* @bio: The BIO being submitted
@@ -1635,10 +1620,6 @@ bool blk_zone_plug_bio(struct bio *bio, unsigned int nr_segs)
case REQ_OP_WRITE:
case REQ_OP_WRITE_ZEROES:
return blk_zone_wplug_handle_write(bio, nr_segs);
- case REQ_OP_ZONE_RESET:
- case REQ_OP_ZONE_FINISH:
- case REQ_OP_ZONE_RESET_ALL:
- return blk_zone_wplug_handle_zone_mgmt(bio);
default:
return false;
}