aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorChristian Dietrich <christian.dietrich@informatik.uni-erlangen.de>2011-07-26 21:00:36 -0400
committerNeilBrown <neilb@suse.de>2011-07-26 21:00:36 -0400
commit8bda470e8ebde35f9349e98ecbce4dfb508a60fa (patch)
tree105aa6781eef93c5a2f996c53dfa25fbce818dfe /drivers/md/raid1.c
parenta0a02a7ad62b5615b17294c2075e4916f8d1f0a4 (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/raid1.c')
-rw-r--r--drivers/md/raid1.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index f7431b6d8447..d3a8f4bb4fc3 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -35,6 +35,7 @@
35#include <linux/delay.h> 35#include <linux/delay.h>
36#include <linux/blkdev.h> 36#include <linux/blkdev.h>
37#include <linux/seq_file.h> 37#include <linux/seq_file.h>
38#include <linux/ratelimit.h>
38#include "md.h" 39#include "md.h"
39#include "raid1.h" 40#include "raid1.h"
40#include "bitmap.h" 41#include "bitmap.h"
@@ -287,10 +288,13 @@ static void raid1_end_read_request(struct bio *bio, int error)
287 * oops, read error: 288 * oops, read error:
288 */ 289 */
289 char b[BDEVNAME_SIZE]; 290 char b[BDEVNAME_SIZE];
290 if (printk_ratelimit()) 291 printk_ratelimited(
291 printk(KERN_ERR "md/raid1:%s: %s: rescheduling sector %llu\n", 292 KERN_ERR "md/raid1:%s: %s: "
292 mdname(conf->mddev), 293 "rescheduling sector %llu\n",
293 bdevname(conf->mirrors[mirror].rdev->bdev,b), (unsigned long long)r1_bio->sector); 294 mdname(conf->mddev),
295 bdevname(conf->mirrors[mirror].rdev->bdev,
296 b),
297 (unsigned long long)r1_bio->sector);
294 reschedule_retry(r1_bio); 298 reschedule_retry(r1_bio);
295 } 299 }
296 300
@@ -1580,12 +1584,13 @@ static void raid1d(mddev_t *mddev)
1580 GFP_NOIO, mddev); 1584 GFP_NOIO, mddev);
1581 r1_bio->bios[r1_bio->read_disk] = bio; 1585 r1_bio->bios[r1_bio->read_disk] = bio;
1582 rdev = conf->mirrors[disk].rdev; 1586 rdev = conf->mirrors[disk].rdev;
1583 if (printk_ratelimit()) 1587 printk_ratelimited(
1584 printk(KERN_ERR "md/raid1:%s: redirecting sector %llu to" 1588 KERN_ERR
1585 " other mirror: %s\n", 1589 "md/raid1:%s: redirecting sector %llu"
1586 mdname(mddev), 1590 " to other mirror: %s\n",
1587 (unsigned long long)r1_bio->sector, 1591 mdname(mddev),
1588 bdevname(rdev->bdev,b)); 1592 (unsigned long long)r1_bio->sector,
1593 bdevname(rdev->bdev, b));
1589 bio->bi_sector = r1_bio->sector + rdev->data_offset; 1594 bio->bi_sector = r1_bio->sector + rdev->data_offset;
1590 bio->bi_bdev = rdev->bdev; 1595 bio->bi_bdev = rdev->bdev;
1591 bio->bi_end_io = raid1_end_read_request; 1596 bio->bi_end_io = raid1_end_read_request;