summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-06-02 13:09:44 +0200
committerMike Snitzer <snitzer@redhat.com>2020-06-05 14:59:45 -0400
commitc3ff479dde9f77d044c164f3ff5443bbe2b6c72d (patch)
tree319767cba1f2f70a4d82dd7f4f73e8f0db066ad2 /drivers/md
parent1565929b870fe166c5a57a85d6cb5a2bfe1e6c84 (diff)
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: Hannes Reinecke <hare@suse.de> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-zoned-reclaim.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
index 571bc1d41bab..fd4d47dfcea1 100644
--- a/drivers/md/dm-zoned-reclaim.c
+++ b/drivers/md/dm-zoned-reclaim.c
@@ -371,8 +371,11 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc)
/* Get a data zone */
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;
+ }
start = jiffies;
if (dmz_is_cache(dzone) || dmz_is_rnd(dzone)) {
@@ -416,6 +419,12 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc)
}
out:
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);
return ret;
}
@@ -519,8 +528,6 @@ static void dmz_reclaim_work(struct work_struct *work)
ret = dmz_do_reclaim(zrc);
if (ret && ret != -EINTR) {
- DMDEBUG("(%s): Reclaim error %d",
- dmz_metadata_label(zmd), ret);
if (!dmz_check_dev(zmd))
return;
}