[PATCH RFC 2/5] block: fix invalid zone append status

Keith Busch kbusch at meta.com
Tue May 19 10:23:23 PDT 2026


From: Keith Busch <kbusch at kernel.org>

A bio submitted to a zone block device that breaks the limits is invalid
rather than an IO error. Fix up the return code to report it that way,
as the previously used IOERR is considered a path failure.

Signed-off-by: Keith Busch <kbusch at kernel.org>
---
 block/blk-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 22af5dec112b5..92a802dc8042c 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -604,7 +604,7 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q,
 
 	/* The bio sector must point to the start of a sequential zone */
 	if (!bdev_is_zone_start(bio->bi_bdev, bio->bi_iter.bi_sector))
-		return BLK_STS_IOERR;
+		return BLK_STS_INVAL;
 
 	/*
 	 * Not allowed to cross zone boundaries. Otherwise, the BIO will be
@@ -612,11 +612,11 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q,
 	 * different zones.
 	 */
 	if (nr_sectors > q->limits.chunk_sectors)
-		return BLK_STS_IOERR;
+		return BLK_STS_INVAL;
 
 	/* Make sure the BIO is small enough and will not get split */
 	if (nr_sectors > q->limits.max_zone_append_sectors)
-		return BLK_STS_IOERR;
+		return BLK_STS_INVAL;
 
 	bio->bi_opf |= REQ_NOMERGE;
 
-- 
2.53.0-Meta




More information about the Linux-nvme mailing list