block: improve the error message from bio_check_eod
PATCH 1/1 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]>
--- block/blk-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
block/blk-core.c +3 -4
@@ -592,10 +592,9 @@ static inline int bio_check_eod(struct bio *bio) (nr_sectors > maxsector || bio->bi_iter.bi_sector > maxsector - nr_sectors)) {pr_info_ratelimited ("%s: attempt to access beyond end of device\n" -"%pg: rw=%d, want=%llu, limit=%llu\n" , - current->comm, - bio->bi_bdev, bio->bi_opf, -bio_end_sector (bio), maxsector); +"%pg: rw=%d, sector=%llu, nr_sectors = %u limit=%llu\n" , + current->comm, bio->bi_bdev, bio->bi_opf, + bio->bi_iter.bi_sector, nr_sectors, maxsector);return -EIO ; }return 0 ;
Signature · 1 line
2.30.2
Quoted 16 lines · Christoph Hellwig
Print the start sector and length separately instead of the combined value to help with debugging.
Signed-off-by Christoph Hellwig <[email protected]>--- block/blk-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)block/blk-core.c +0
-0@@ -592,10 +592,9 @@ static inline int bio_check_eod(struct bio *bio) (nr_sectors > maxsector || bio->bi_iter.bi_sector > maxsector - nr_sectors)) { pr_info_ratelimited("%s: attempt to access beyond end of device\n"
block/blk-core.c static inline int bio_check_eod(struct bio *bio) · line 600
Quoted 10 lines
block/blk-core.c +3
-4-"%pg: rw=%d, want=%llu, limit=%llu\n" , - current->comm, - bio->bi_bdev, bio->bi_opf, - bio_end_sector(bio), maxsector); +"%pg: rw=%d, sector=%llu, nr_sectors = %u limit=%llu\n" , + current->comm, bio->bi_bdev, bio->bi_opf, + bio->bi_iter.bi_sector, nr_sectors, maxsector);return -EIO ; }return 0 ;
Looks good.
Reviewed-by Damien Le Moal <[email protected]>
Signature · 2 lines
Damien Le Moal Western Digital Research
Quoted 4 lines · Christoph Hellwig
Print the start sector and length separately instead of the combined value to help with debugging.
Applied, thanks!
[1/1] block: improve the error message from bio_check_eod
commit: 069adbac2cd85ae00252da6c5576cbf9b9d9ba6e
Best regards,
Signature · 1 line
Jens Axboe