From: Christoph Hellwig <hch@infradead.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH] block: ratelimit handle_bad_sector() message
Date: Thu, 8 Oct 2020 07:40:49 +0100 [thread overview]
Message-ID: <20201008064049.GA29599@infradead.org> (raw)
In-Reply-To: <20201008002344.6759-1-penguin-kernel@I-love.SAKURA.ne.jp>
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.
next prev parent reply other threads:[~2020-10-08 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-08 0:23 [PATCH] block: ratelimit handle_bad_sector() message Tetsuo Handa
2020-10-08 6:40 ` Christoph Hellwig [this message]
2020-10-08 13:37 ` [PATCH v2] " Tetsuo Handa
2020-10-08 13:52 ` Christoph Hellwig
2020-10-08 16:17 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201008064049.GA29599@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).