diff options
author | Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> | 2011-07-26 21:00:36 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-26 21:00:36 -0400 |
commit | 8bda470e8ebde35f9349e98ecbce4dfb508a60fa (patch) | |
tree | 105aa6781eef93c5a2f996c53dfa25fbce818dfe /drivers/md/raid10.c | |
parent | a0a02a7ad62b5615b17294c2075e4916f8d1f0a4 (diff) |
md/raid: use printk_ratelimited instead of printk_ratelimit
As per printk_ratelimit comment, it should not be used.
Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 3715e220e5e0..1725ec1e1e82 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/blkdev.h> | 23 | #include <linux/blkdev.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/ratelimit.h> | ||
25 | #include "md.h" | 26 | #include "md.h" |
26 | #include "raid10.h" | 27 | #include "raid10.h" |
27 | #include "raid0.h" | 28 | #include "raid0.h" |
@@ -301,10 +302,11 @@ static void raid10_end_read_request(struct bio *bio, int error) | |||
301 | * oops, read error - keep the refcount on the rdev | 302 | * oops, read error - keep the refcount on the rdev |
302 | */ | 303 | */ |
303 | char b[BDEVNAME_SIZE]; | 304 | char b[BDEVNAME_SIZE]; |
304 | if (printk_ratelimit()) | 305 | printk_ratelimited(KERN_ERR |
305 | printk(KERN_ERR "md/raid10:%s: %s: rescheduling sector %llu\n", | 306 | "md/raid10:%s: %s: rescheduling sector %llu\n", |
306 | mdname(conf->mddev), | 307 | mdname(conf->mddev), |
307 | bdevname(conf->mirrors[dev].rdev->bdev,b), (unsigned long long)r10_bio->sector); | 308 | bdevname(conf->mirrors[dev].rdev->bdev, b), |
309 | (unsigned long long)r10_bio->sector); | ||
308 | reschedule_retry(r10_bio); | 310 | reschedule_retry(r10_bio); |
309 | } | 311 | } |
310 | } | 312 | } |
@@ -1669,12 +1671,13 @@ static void raid10d(mddev_t *mddev) | |||
1669 | bio_put(bio); | 1671 | bio_put(bio); |
1670 | slot = r10_bio->read_slot; | 1672 | slot = r10_bio->read_slot; |
1671 | rdev = conf->mirrors[mirror].rdev; | 1673 | rdev = conf->mirrors[mirror].rdev; |
1672 | if (printk_ratelimit()) | 1674 | printk_ratelimited( |
1673 | printk(KERN_ERR "md/raid10:%s: %s: redirecting sector %llu to" | 1675 | KERN_ERR |
1674 | " another mirror\n", | 1676 | "md/raid10:%s: %s: redirecting" |
1675 | mdname(mddev), | 1677 | "sector %llu to another mirror\n", |
1676 | bdevname(rdev->bdev,b), | 1678 | mdname(mddev), |
1677 | (unsigned long long)r10_bio->sector); | 1679 | bdevname(rdev->bdev, b), |
1680 | (unsigned long long)r10_bio->sector); | ||
1678 | bio = bio_clone_mddev(r10_bio->master_bio, | 1681 | bio = bio_clone_mddev(r10_bio->master_bio, |
1679 | GFP_NOIO, mddev); | 1682 | GFP_NOIO, mddev); |
1680 | r10_bio->devs[slot].bio = bio; | 1683 | r10_bio->devs[slot].bio = bio; |