From: Jens Axboe <jens.axboe@oracle.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Luben Tuikov <ltuikov@yahoo.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/2] [SCSI] Print only a single message "rejecting I/O to device being removed"
Date: Tue, 7 Nov 2006 08:45:08 +0100 [thread overview]
Message-ID: <20061107074508.GP19471@kernel.dk> (raw)
In-Reply-To: <1162851375.4551.6.camel@mulgrave.il.steeleye.com>
On Tue, Nov 07 2006, James Bottomley wrote:
> On Mon, 2006-11-06 at 22:00 +0100, Jens Axboe wrote:
> > So, again, I'll ask James' (this time cc'ed) opinion on what he thinks.
> > Perhaps he agrees that we should go the ratelimit route, or perhaps he
> > likes your version. If the former, I'll be happy to code that up
> > (should be a 1 minute job).
>
> I agree we should be using the standard tools rather than inventing our
> own, so printk_ratelimit() would be the correct way to do this.
Alright, then it turns into something like this:
-----
[SCSI] Rate limit IO reject messages
Otherwise we can flood the system with messages when a device is
removed.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index d2c02df..a935b9d 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1149,7 +1149,8 @@ static int scsi_prep_fn(struct request_q
specials_only == SDEV_BLOCK)
goto defer;
- sdev_printk(KERN_ERR, sdev,
+ if (printk_ratelimit())
+ sdev_printk(KERN_ERR, sdev,
"rejecting I/O to device being removed\n");
goto kill;
}
--
Jens Axboe
prev parent reply other threads:[~2006-11-07 7:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-03 9:17 [PATCH 1/2] [SCSI] Print only a single message "rejecting I/O to device being removed" Luben Tuikov
2006-11-03 12:29 ` Jens Axboe
2006-11-04 19:51 ` Luben Tuikov
2006-11-05 11:36 ` Jens Axboe
2006-11-05 19:08 ` Luben Tuikov
2006-11-06 21:00 ` Jens Axboe
2006-11-06 22:16 ` James Bottomley
2006-11-07 7:45 ` Jens Axboe [this message]
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=20061107074508.GP19471@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ltuikov@yahoo.com \
/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 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.