Re: [PATCH] block: ratelimit handle_bad_sector() message

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

 



On Thu, Oct 08, 2020 at 09:23:44AM +0900, Tetsuo Handa wrote:
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -803,8 +803,8 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector)
>  {
>  	char b[BDEVNAME_SIZE];
>  
> -	printk(KERN_INFO "attempt to access beyond end of device\n");
> -	printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n",
> +	printk_ratelimited(KERN_INFO "attempt to access beyond end of device\n");
> +	printk_ratelimited(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n",
>  			bio_devname(bio, b), bio->bi_opf,
>  			(unsigned long long)bio_end_sector(bio),
>  			(long long)maxsector);

Please use pr_info_ratelimited, and also remove the casts now that
sector_t is guranteed to be an unsigned long long.



[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