summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-zoned-reclaim.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-05-11 10:24:22 +0200
committerMike Snitzer <snitzer@redhat.com>2020-05-15 10:29:37 -0400
commit2234e7321dc61f116de1dc913f3ffa7efff02068 (patch)
tree037fb13a78992931101203e69361ccedb4121521 /drivers/md/dm-zoned-reclaim.c
parent368205601375bbfb41b07ec8295eab208b6fced5 (diff)
downloadlinux-2234e7321dc61f116de1dc913f3ffa7efff02068.tar.bz2
dm zoned: introduce dmz_metadata_label() to format device name
Introduce dmz_metadata_label() to format the device-mapper device name and use it instead of the device name of the underlying device. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Bob Liu <bob.liu@oracle.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-zoned-reclaim.c')
-rw-r--r--drivers/md/dm-zoned-reclaim.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
index 5aa5e5130fe8..699c4145306e 100644
--- a/drivers/md/dm-zoned-reclaim.c
+++ b/drivers/md/dm-zoned-reclaim.c
@@ -480,15 +480,16 @@ static void dmz_reclaim_work(struct work_struct *work)
zrc->kc_throttle.throttle = min(75U, 100U - p_unmap_rnd / 2);
}
- dmz_dev_debug(zrc->dev,
- "Reclaim (%u): %s, %u%% free rnd zones (%u/%u)",
- zrc->kc_throttle.throttle,
- (dmz_target_idle(zrc) ? "Idle" : "Busy"),
- p_unmap_rnd, nr_unmap_rnd, nr_rnd);
+ DMDEBUG("(%s): Reclaim (%u): %s, %u%% free rnd zones (%u/%u)",
+ dmz_metadata_label(zmd),
+ zrc->kc_throttle.throttle,
+ (dmz_target_idle(zrc) ? "Idle" : "Busy"),
+ p_unmap_rnd, nr_unmap_rnd, nr_rnd);
ret = dmz_do_reclaim(zrc);
if (ret) {
- dmz_dev_debug(zrc->dev, "Reclaim error %d\n", ret);
+ DMDEBUG("(%s): Reclaim error %d\n",
+ dmz_metadata_label(zmd), ret);
if (!dmz_check_bdev(zrc->dev))
return;
}
@@ -524,7 +525,7 @@ int dmz_ctr_reclaim(struct dmz_dev *dev, struct dmz_metadata *zmd,
/* Reclaim work */
INIT_DELAYED_WORK(&zrc->work, dmz_reclaim_work);
zrc->wq = alloc_ordered_workqueue("dmz_rwq_%s", WQ_MEM_RECLAIM,
- dev->name);
+ dmz_metadata_label(zmd));
if (!zrc->wq) {
ret = -ENOMEM;
goto err;