Commit c3ff479d authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Mike Snitzer

dm zoned: improve logging messages for reclaim

Instead of just reporting the errno, add some more verbose debugging
message in the reclaim path.
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 1565929b
...@@ -371,8 +371,11 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc) ...@@ -371,8 +371,11 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc)
/* Get a data zone */ /* Get a data zone */
dzone = dmz_get_zone_for_reclaim(zmd, dmz_target_idle(zrc)); dzone = dmz_get_zone_for_reclaim(zmd, dmz_target_idle(zrc));
if (!dzone) if (!dzone) {
DMDEBUG("(%s): No zone found to reclaim",
dmz_metadata_label(zmd));
return -EBUSY; return -EBUSY;
}
start = jiffies; start = jiffies;
if (dmz_is_cache(dzone) || dmz_is_rnd(dzone)) { if (dmz_is_cache(dzone) || dmz_is_rnd(dzone)) {
...@@ -416,6 +419,12 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc) ...@@ -416,6 +419,12 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc)
} }
out: out:
if (ret) { if (ret) {
if (ret == -EINTR)
DMDEBUG("(%s): reclaim zone %u interrupted",
dmz_metadata_label(zmd), rzone->id);
else
DMDEBUG("(%s): Failed to reclaim zone %u, err %d",
dmz_metadata_label(zmd), rzone->id, ret);
dmz_unlock_zone_reclaim(dzone); dmz_unlock_zone_reclaim(dzone);
return ret; return ret;
} }
...@@ -519,8 +528,6 @@ static void dmz_reclaim_work(struct work_struct *work) ...@@ -519,8 +528,6 @@ static void dmz_reclaim_work(struct work_struct *work)
ret = dmz_do_reclaim(zrc); ret = dmz_do_reclaim(zrc);
if (ret && ret != -EINTR) { if (ret && ret != -EINTR) {
DMDEBUG("(%s): Reclaim error %d",
dmz_metadata_label(zmd), ret);
if (!dmz_check_dev(zmd)) if (!dmz_check_dev(zmd))
return; return;
} }
......
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