summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-05-04 16:33:55 +0200
committerJens Axboe <axboe@kernel.dk>2022-05-05 02:30:10 +0200
commit069adbac2cd85ae00252da6c5576cbf9b9d9ba6e (patch)
tree900fa4ef79c4788cc5f4729e1663229068b07dbc /block
parentblock: allow passing a NULL bdev to bio_alloc_clone/bio_init_clone (diff)
downloadlinux-069adbac2cd85ae00252da6c5576cbf9b9d9ba6e.tar.xz
linux-069adbac2cd85ae00252da6c5576cbf9b9d9ba6e.zip
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 <hch@lst.de> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Link: https://lore.kernel.org/r/20220504143355.568660-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index f305cb66c72a..c3f1e46ddd43 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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;