Commit 1b70ccec authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

drbd: stop using bdevname in drbd_report_io_error

Just use the %pg format specifier instead.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChristoph Böhmwalder <christoph.boehmwalder@linbit.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220713055317.1888500-4-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 02ff3dd2
...@@ -523,16 +523,14 @@ static void mod_rq_state(struct drbd_request *req, struct bio_and_error *m, ...@@ -523,16 +523,14 @@ static void mod_rq_state(struct drbd_request *req, struct bio_and_error *m,
static void drbd_report_io_error(struct drbd_device *device, struct drbd_request *req) static void drbd_report_io_error(struct drbd_device *device, struct drbd_request *req)
{ {
char b[BDEVNAME_SIZE];
if (!__ratelimit(&drbd_ratelimit_state)) if (!__ratelimit(&drbd_ratelimit_state))
return; return;
drbd_warn(device, "local %s IO error sector %llu+%u on %s\n", drbd_warn(device, "local %s IO error sector %llu+%u on %pg\n",
(req->rq_state & RQ_WRITE) ? "WRITE" : "READ", (req->rq_state & RQ_WRITE) ? "WRITE" : "READ",
(unsigned long long)req->i.sector, (unsigned long long)req->i.sector,
req->i.size >> 9, req->i.size >> 9,
bdevname(device->ldev->backing_bdev, b)); device->ldev->backing_bdev);
} }
/* Helper for HANDED_OVER_TO_NETWORK. /* Helper for HANDED_OVER_TO_NETWORK.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment