All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: improve the error message from bio_check_eod
@ 2022-05-04 14:33 Christoph Hellwig
  2022-05-04 15:34 ` Damien Le Moal
  2022-05-05  0:30 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-05-04 14:33 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

Print the start sector and length separately instead of the combined
value to help with debugging.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 937bb6b863317..10b32a1cc42b7 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;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: improve the error message from bio_check_eod
  2022-05-04 14:33 [PATCH] block: improve the error message from bio_check_eod Christoph Hellwig
@ 2022-05-04 15:34 ` Damien Le Moal
  2022-05-05  0:30 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2022-05-04 15:34 UTC (permalink / raw)
  To: Christoph Hellwig, axboe; +Cc: linux-block

On 2022/05/04 23:33, Christoph Hellwig wrote:
> Print the start sector and length separately instead of the combined
> value to help with debugging.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  block/blk-core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 937bb6b863317..10b32a1cc42b7 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;

Looks good.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: improve the error message from bio_check_eod
  2022-05-04 14:33 [PATCH] block: improve the error message from bio_check_eod Christoph Hellwig
  2022-05-04 15:34 ` Damien Le Moal
@ 2022-05-05  0:30 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2022-05-05  0:30 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block

On Wed, 4 May 2022 07:33:55 -0700, Christoph Hellwig wrote:
> 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,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-05  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 14:33 [PATCH] block: improve the error message from bio_check_eod Christoph Hellwig
2022-05-04 15:34 ` Damien Le Moal
2022-05-05  0:30 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.