* [PATCH 3/2] block: don't return 1 for the fallback case in blkdev_get_zone_info
@ 2025-11-06 14:53 Christoph Hellwig
2025-11-07 6:14 ` Damien Le Moal
2025-11-07 11:38 ` Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2025-11-06 14:53 UTC (permalink / raw)
To: Jens Axboe; +Cc: Damien Le Moal, linux-block
blkdev_do_report_zones returns the number of reported zones, but
blkdev_get_zone_info returns 0 or an errno. Translate to the expected
return value in blkdev_report_zone_fallback.
Fixes: b037d41762fd ("block: introduce blkdev_get_zone_info()")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-zoned.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index c5226bcaaa94..8204214e3b89 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -895,8 +895,14 @@ static int blkdev_report_zone_fallback(struct block_device *bdev,
.data = zone,
.report_active = true,
};
+ int error;
- return blkdev_do_report_zones(bdev, sector, 1, &args);
+ error = blkdev_do_report_zones(bdev, sector, 1, &args);
+ if (error < 0)
+ return error;
+ if (error == 0)
+ return -EIO;
+ return 0;
}
/*
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 3/2] block: don't return 1 for the fallback case in blkdev_get_zone_info
2025-11-06 14:53 [PATCH 3/2] block: don't return 1 for the fallback case in blkdev_get_zone_info Christoph Hellwig
@ 2025-11-07 6:14 ` Damien Le Moal
2025-11-07 11:37 ` Christoph Hellwig
2025-11-07 11:38 ` Jens Axboe
1 sibling, 1 reply; 4+ messages in thread
From: Damien Le Moal @ 2025-11-07 6:14 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe; +Cc: linux-block
On 11/6/25 23:53, Christoph Hellwig wrote:
> blkdev_do_report_zones returns the number of reported zones, but
> blkdev_get_zone_info returns 0 or an errno. Translate to the expected
> return value in blkdev_report_zone_fallback.
>
> Fixes: b037d41762fd ("block: introduce blkdev_get_zone_info()")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Doh! Of course...
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Note: Is this patch alone or part of a series ? (the subject has the odd 3/2...)
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 3/2] block: don't return 1 for the fallback case in blkdev_get_zone_info
2025-11-07 6:14 ` Damien Le Moal
@ 2025-11-07 11:37 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2025-11-07 11:37 UTC (permalink / raw)
To: Damien Le Moal; +Cc: Christoph Hellwig, Jens Axboe, linux-block
On Fri, Nov 07, 2025 at 03:14:20PM +0900, Damien Le Moal wrote:
> Note: Is this patch alone or part of a series ?
> (the subject has the odd 3/2...)
Yeah, this was supposed to be a follow up to the report zones caching
fixes, but I edited out the in-reply-to header accidentally.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/2] block: don't return 1 for the fallback case in blkdev_get_zone_info
2025-11-06 14:53 [PATCH 3/2] block: don't return 1 for the fallback case in blkdev_get_zone_info Christoph Hellwig
2025-11-07 6:14 ` Damien Le Moal
@ 2025-11-07 11:38 ` Jens Axboe
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2025-11-07 11:38 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Damien Le Moal, linux-block
On Thu, 06 Nov 2025 15:53:32 +0100, Christoph Hellwig wrote:
> blkdev_do_report_zones returns the number of reported zones, but
> blkdev_get_zone_info returns 0 or an errno. Translate to the expected
> return value in blkdev_report_zone_fallback.
>
>
Applied, thanks!
[3/3] block: don't return 1 for the fallback case in blkdev_get_zone_info
commit: 86a9ce21f5b781c56eba23cbbd2264ab74778ab0
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-07 11:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-06 14:53 [PATCH 3/2] block: don't return 1 for the fallback case in blkdev_get_zone_info Christoph Hellwig
2025-11-07 6:14 ` Damien Le Moal
2025-11-07 11:37 ` Christoph Hellwig
2025-11-07 11:38 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).