* [PATCH] block: tone down bio_check_eod
@ 2025-08-18 10:11 Christoph Hellwig
2025-08-18 19:29 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2025-08-18 10:11 UTC (permalink / raw)
To: axboe; +Cc: linux-block
bdev_nr_sectors() == 0 is a pattern used for block devices that have
been hot removed, don't spam the log about them.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index fdac48aec5ef..4201504158a1 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -557,7 +557,7 @@ static inline int bio_check_eod(struct bio *bio)
sector_t maxsector = bdev_nr_sectors(bio->bi_bdev);
unsigned int nr_sectors = bio_sectors(bio);
- if (nr_sectors &&
+ if (nr_sectors && maxsector &&
(nr_sectors > maxsector ||
bio->bi_iter.bi_sector > maxsector - nr_sectors)) {
pr_info_ratelimited("%s: attempt to access beyond end of device\n"
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: tone down bio_check_eod
2025-08-18 10:11 [PATCH] block: tone down bio_check_eod Christoph Hellwig
@ 2025-08-18 19:29 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-08-18 19:29 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block
On Mon, 18 Aug 2025 12:11:02 +0200, Christoph Hellwig wrote:
> bdev_nr_sectors() == 0 is a pattern used for block devices that have
> been hot removed, don't spam the log about them.
>
>
Applied, thanks!
[1/1] block: tone down bio_check_eod
commit: d0a2b527d8c32e46ccb8a34053468d4ff0c27e5c
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-18 19:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 10:11 [PATCH] block: tone down bio_check_eod Christoph Hellwig
2025-08-18 19:29 ` 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).