diff options
author | Christoph Hellwig <hch@lst.de> | 2022-03-04 19:01:01 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-03-07 06:42:33 -0700 |
commit | ee1925bd834418218c782c94e889f826d40b14d5 (patch) | |
tree | 2a4f89bb5c6b79c707e590686c0a1e7ca6713cb5 /drivers/md/md-multipath.c | |
parent | 0a806cfde82fcd1fb856864e33d17c68d1b51dee (diff) | |
download | linux-ee1925bd834418218c782c94e889f826d40b14d5.tar.gz linux-ee1925bd834418218c782c94e889f826d40b14d5.tar.bz2 linux-ee1925bd834418218c782c94e889f826d40b14d5.zip |
md-multipath: stop using bio_devname
Use the %pg format specifier to save on stack consuption and code size.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220304180105.409765-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/md-multipath.c')
-rw-r--r-- | drivers/md/md-multipath.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/md-multipath.c b/drivers/md/md-multipath.c index 97fb948e3e74..3081a936350d 100644 --- a/drivers/md/md-multipath.c +++ b/drivers/md/md-multipath.c @@ -297,7 +297,6 @@ static void multipathd(struct md_thread *thread) md_check_recovery(mddev); for (;;) { - char b[BDEVNAME_SIZE]; spin_lock_irqsave(&conf->device_lock, flags); if (list_empty(head)) break; @@ -309,13 +308,13 @@ static void multipathd(struct md_thread *thread) bio->bi_iter.bi_sector = mp_bh->master_bio->bi_iter.bi_sector; if ((mp_bh->path = multipath_map (conf))<0) { - pr_err("multipath: %s: unrecoverable IO read error for block %llu\n", - bio_devname(bio, b), + pr_err("multipath: %pg: unrecoverable IO read error for block %llu\n", + bio->bi_bdev, (unsigned long long)bio->bi_iter.bi_sector); multipath_end_bh_io(mp_bh, BLK_STS_IOERR); } else { - pr_err("multipath: %s: redirecting sector %llu to another IO path\n", - bio_devname(bio, b), + pr_err("multipath: %pg: redirecting sector %llu to another IO path\n", + bio->bi_bdev, (unsigned long long)bio->bi_iter.bi_sector); *bio = *(mp_bh->master_bio); bio->bi_iter.bi_sector += |