Re: [PATCH] block: print the current process in handle_bad_sector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> ---
>  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@xxxxxxx>

-- 
Damien Le Moal
Western Digital Research



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux