diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2010-10-28 08:15:26 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-10-28 08:15:26 -0400 |
commit | 027b180d7405f2b2df25e2a8b1b796b00f3773cf (patch) | |
tree | 131c7744e2f4c2d3deeb8d74485c528e67707e80 /drivers/block/aoe | |
parent | e1fbd9210d5d172f951b1d21eb58383919c4d10d (diff) |
drivers/block/aoe/aoeblk.c: ratelimit a warning printk
As described in https://bugzilla.kernel.org/show_bug.cgi?id=19922
: I had an AoE device go down overnight, and while a server was trying to
: write to it, it was also writing this message to its logs:
:
: 209 printk(KERN_INFO "aoe: device %ld.%d is not up\n",
: 210 d->aoemajor, d->aoeminor);
:
: The message appeared many times per second, and over several hours
: produced about 7.5 gigabytes of log files, filling up all free space on
: the root filesystem.
Cc: "Ed L. Cashin" <ecashin@coraid.com>
Suggested-by: Roman Mamedov <roman@rm.pp.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index f21c237a9e5e..541e18879965 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -4,12 +4,14 @@ | |||
4 | * block device routines | 4 | * block device routines |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/kernel.h> | ||
7 | #include <linux/hdreg.h> | 8 | #include <linux/hdreg.h> |
8 | #include <linux/blkdev.h> | 9 | #include <linux/blkdev.h> |
9 | #include <linux/backing-dev.h> | 10 | #include <linux/backing-dev.h> |
10 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
11 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/ratelimit.h> | ||
13 | #include <linux/genhd.h> | 15 | #include <linux/genhd.h> |
14 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
15 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
@@ -207,7 +209,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio) | |||
207 | spin_lock_irqsave(&d->lock, flags); | 209 | spin_lock_irqsave(&d->lock, flags); |
208 | 210 | ||
209 | if ((d->flags & DEVFL_UP) == 0) { | 211 | if ((d->flags & DEVFL_UP) == 0) { |
210 | printk(KERN_INFO "aoe: device %ld.%d is not up\n", | 212 | pr_info_ratelimited("aoe: device %ld.%d is not up\n", |
211 | d->aoemajor, d->aoeminor); | 213 | d->aoemajor, d->aoeminor); |
212 | spin_unlock_irqrestore(&d->lock, flags); | 214 | spin_unlock_irqrestore(&d->lock, flags); |
213 | mempool_free(buf, d->bufpool); | 215 | mempool_free(buf, d->bufpool); |