diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 99d5af1362d7..258d4eb2d63c 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -402,10 +402,9 @@ static void raid1_end_read_request(struct bio *bio) /* * oops, read error: */ - char b[BDEVNAME_SIZE]; - pr_err_ratelimited("md/raid1:%s: %s: rescheduling sector %llu\n", + pr_err_ratelimited("md/raid1:%s: %pg: rescheduling sector %llu\n", mdname(conf->mddev), - bdevname(rdev->bdev, b), + rdev->bdev, (unsigned long long)r1_bio->sector); set_bit(R1BIO_ReadError, &r1_bio->state); reschedule_retry(r1_bio); @@ -1283,10 +1282,10 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio, mirror = conf->mirrors + rdisk; if (r1bio_existed) - pr_info_ratelimited("md/raid1:%s: redirecting sector %llu to other mirror: %s\n", + pr_info_ratelimited("md/raid1:%s: redirecting sector %llu to other mirror: %pg\n", mdname(mddev), (unsigned long long)r1_bio->sector, - bdevname(mirror->rdev->bdev, b)); + mirror->rdev->bdev); if (test_bit(WriteMostly, &mirror->rdev->flags) && bitmap) { @@ -1659,7 +1658,6 @@ static void raid1_status(struct seq_file *seq, struct mddev *mddev) */ static void raid1_error(struct mddev *mddev, struct md_rdev *rdev) { - char b[BDEVNAME_SIZE]; struct r1conf *conf = mddev->private; unsigned long flags; @@ -1686,9 +1684,9 @@ static void raid1_error(struct mddev *mddev, struct md_rdev *rdev) set_bit(MD_RECOVERY_INTR, &mddev->recovery); set_mask_bits(&mddev->sb_flags, 0, BIT(MD_SB_CHANGE_DEVS) | BIT(MD_SB_CHANGE_PENDING)); - pr_crit("md/raid1:%s: Disk failure on %s, disabling device.\n" + pr_crit("md/raid1:%s: Disk failure on %pg, disabling device.\n" "md/raid1:%s: Operation continuing on %d devices.\n", - mdname(mddev), bdevname(rdev->bdev, b), + mdname(mddev), rdev->bdev, mdname(mddev), conf->raid_disks - mddev->degraded); } @@ -1706,13 +1704,12 @@ static void print_conf(struct r1conf *conf) rcu_read_lock(); for (i = 0; i < conf->raid_disks; i++) { - char b[BDEVNAME_SIZE]; struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); if (rdev) - pr_debug(" disk %d, wo:%d, o:%d, dev:%s\n", + pr_debug(" disk %d, wo:%d, o:%d, dev:%pg\n", i, !test_bit(In_sync, &rdev->flags), !test_bit(Faulty, &rdev->flags), - bdevname(rdev->bdev,b)); + rdev->bdev); } rcu_read_unlock(); } @@ -2347,7 +2344,6 @@ static void fix_read_error(struct r1conf *conf, int read_disk, } d = start; while (d != read_disk) { - char b[BDEVNAME_SIZE]; if (d==0) d = conf->raid_disks * 2; d--; @@ -2360,11 +2356,11 @@ static void fix_read_error(struct r1conf *conf, int read_disk, if (r1_sync_page_io(rdev, sect, s, conf->tmppage, READ)) { atomic_add(s, &rdev->corrected_errors); - pr_info("md/raid1:%s: read error corrected (%d sectors at %llu on %s)\n", + pr_info("md/raid1:%s: read error corrected (%d sectors at %llu on %pg)\n", mdname(mddev), s, (unsigned long long)(sect + rdev->data_offset), - bdevname(rdev->bdev, b)); + rdev->bdev); } rdev_dec_pending(rdev, mddev); } else |