All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: print the current process in handle_bad_sector
@ 2021-09-28  5:27 Christoph Hellwig
  2021-09-28  5:51 ` Damien Le Moal
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christoph Hellwig @ 2021-09-28  5:27 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

Make the bad sector information a little more useful by printing
current->comm to identify the caller.

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

diff --git a/block/blk-core.c b/block/blk-core.c
index 5454db2fa263b..4c2a3db4bd336 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -636,8 +636,9 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector)
 {
 	char b[BDEVNAME_SIZE];
 
-	pr_info_ratelimited("attempt to access beyond end of device\n"
+	pr_info_ratelimited("%s: attempt to access beyond end of device\n"
 			    "%s: rw=%d, want=%llu, limit=%llu\n",
+			    current->comm,
 			    bio_devname(bio, b), bio->bi_opf,
 			    bio_end_sector(bio), maxsector);
 }
-- 
2.30.2


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

* Re: [PATCH] block: print the current process in handle_bad_sector
  2021-09-28  5:27 [PATCH] block: print the current process in handle_bad_sector Christoph Hellwig
@ 2021-09-28  5:51 ` Damien Le Moal
  2021-09-28 20:44 ` Chaitanya Kulkarni
  2021-09-28 20:48 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Damien Le Moal @ 2021-09-28  5:51 UTC (permalink / raw)
  To: Christoph Hellwig, axboe; +Cc: linux-block

On 2021/09/28 14:27, Christoph Hellwig wrote:
> Make the bad sector information a little more useful by printing
> current->comm to identify the caller.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  block/blk-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 5454db2fa263b..4c2a3db4bd336 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -636,8 +636,9 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector)
>  {
>  	char b[BDEVNAME_SIZE];
>  
> -	pr_info_ratelimited("attempt to access beyond end of device\n"
> +	pr_info_ratelimited("%s: attempt to access beyond end of device\n"
>  			    "%s: rw=%d, want=%llu, limit=%llu\n",
> +			    current->comm,
>  			    bio_devname(bio, b), bio->bi_opf,
>  			    bio_end_sector(bio), maxsector);
>  }

Looks good. A stack dump, while noisier, would be even more useful :)

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

-- 
Damien Le Moal
Western Digital Research

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

* Re: [PATCH] block: print the current process in handle_bad_sector
  2021-09-28  5:27 [PATCH] block: print the current process in handle_bad_sector Christoph Hellwig
  2021-09-28  5:51 ` Damien Le Moal
@ 2021-09-28 20:44 ` Chaitanya Kulkarni
  2021-09-28 20:48 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-28 20:44 UTC (permalink / raw)
  To: Christoph Hellwig, axboe; +Cc: linux-block

On 9/27/21 10:27 PM, Christoph Hellwig wrote:
> Make the bad sector information a little more useful by printing
> current->comm to identify the caller.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>



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

* Re: [PATCH] block: print the current process in handle_bad_sector
  2021-09-28  5:27 [PATCH] block: print the current process in handle_bad_sector Christoph Hellwig
  2021-09-28  5:51 ` Damien Le Moal
  2021-09-28 20:44 ` Chaitanya Kulkarni
@ 2021-09-28 20:48 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2021-09-28 20:48 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block

On 9/27/21 11:27 PM, Christoph Hellwig wrote:
> Make the bad sector information a little more useful by printing
> current->comm to identify the caller.

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2021-09-28 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  5:27 [PATCH] block: print the current process in handle_bad_sector Christoph Hellwig
2021-09-28  5:51 ` Damien Le Moal
2021-09-28 20:44 ` Chaitanya Kulkarni
2021-09-28 20:48 ` 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.