diff options
author | Christoph Hellwig <hch@lst.de> | 2022-05-12 08:19:13 +0200 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2022-05-22 23:07:21 -0700 |
commit | 913cce5a1e588e3470ea064fe4ea336037d3a454 (patch) | |
tree | d5335aef357429a908652048eb5c83292640a612 /drivers/md/md-multipath.c | |
parent | 1e267742283a4b5a8ca65755c44166be27e9aa0f (diff) | |
download | linux-913cce5a1e588e3470ea064fe4ea336037d3a454.tar.gz linux-913cce5a1e588e3470ea064fe4ea336037d3a454.tar.bz2 linux-913cce5a1e588e3470ea064fe4ea336037d3a454.zip |
md: remove most calls to bdevname
Use the %pg format specifier to save on stack consumption and code size.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md/md-multipath.c')
-rw-r--r-- | drivers/md/md-multipath.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/md/md-multipath.c b/drivers/md/md-multipath.c index 1c6dbf92c136..66edf5e72bd6 100644 --- a/drivers/md/md-multipath.c +++ b/drivers/md/md-multipath.c @@ -87,10 +87,9 @@ static void multipath_end_request(struct bio *bio) /* * oops, IO error: */ - char b[BDEVNAME_SIZE]; md_error (mp_bh->mddev, rdev); - pr_info("multipath: %s: rescheduling sector %llu\n", - bdevname(rdev->bdev,b), + pr_info("multipath: %pg: rescheduling sector %llu\n", + rdev->bdev, (unsigned long long)bio->bi_iter.bi_sector); multipath_reschedule_retry(mp_bh); } else @@ -154,7 +153,6 @@ static void multipath_status(struct seq_file *seq, struct mddev *mddev) static void multipath_error (struct mddev *mddev, struct md_rdev *rdev) { struct mpconf *conf = mddev->private; - char b[BDEVNAME_SIZE]; if (conf->raid_disks - mddev->degraded <= 1) { /* @@ -177,9 +175,9 @@ static void multipath_error (struct mddev *mddev, struct md_rdev *rdev) } set_bit(Faulty, &rdev->flags); set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags); - pr_err("multipath: IO failure on %s, disabling IO path.\n" + pr_err("multipath: IO failure on %pg, disabling IO path.\n" "multipath: Operation continuing on %d IO paths.\n", - bdevname(rdev->bdev, b), + rdev->bdev, conf->raid_disks - mddev->degraded); } @@ -197,12 +195,11 @@ static void print_multipath_conf (struct mpconf *conf) conf->raid_disks); for (i = 0; i < conf->raid_disks; i++) { - char b[BDEVNAME_SIZE]; tmp = conf->multipaths + i; if (tmp->rdev) - pr_debug(" disk%d, o:%d, dev:%s\n", + pr_debug(" disk%d, o:%d, dev:%pg\n", i,!test_bit(Faulty, &tmp->rdev->flags), - bdevname(tmp->rdev->bdev,b)); + tmp->rdev->bdev); } } |