Skip to content

Commit 069adba

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: improve the error message from bio_check_eod
Print the start sector and length separately instead of the combined value to help with debugging. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 7ecc56c commit 069adba

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

block/blk-core.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,9 @@ static inline int bio_check_eod(struct bio *bio)
592592
(nr_sectors > maxsector ||
593593
bio->bi_iter.bi_sector > maxsector - nr_sectors)) {
594594
pr_info_ratelimited("%s: attempt to access beyond end of device\n"
595-
"%pg: rw=%d, want=%llu, limit=%llu\n",
596-
current->comm,
597-
bio->bi_bdev, bio->bi_opf,
598-
bio_end_sector(bio), maxsector);
595+
"%pg: rw=%d, sector=%llu, nr_sectors = %u limit=%llu\n",
596+
current->comm, bio->bi_bdev, bio->bi_opf,
597+
bio->bi_iter.bi_sector, nr_sectors, maxsector);
599598
return -EIO;
600599
}
601600
return 0;

0 commit comments

Comments
 (0)