From: Alexander Zarochentsev Date: Tue, 3 Mar 2020 20:50:39 +0000 (+0300) Subject: LU-13399 lfsck: tune lfsck repair message X-Git-Tag: 2.13.54~195 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3911f551b759068c16d390cb7b5661108d7e6cb0;p=fs%2Flustre-release.git LU-13399 lfsck: tune lfsck repair message namespace LFSCK repair the shard N message printed even there was nothing to repair which is confusing. HPE-bug-id: LUS-8548 Signed-off-by: Alexander Zarochentsev Change-Id: I34cc79f59eb76c1f6a86baeed81f8372c133b746 Reviewed-on: https://review.whamcloud.com/38100 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: Alexander Boyko Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/lfsck/lfsck_striped_dir.c b/lustre/lfsck/lfsck_striped_dir.c index e451a38..b2459af 100644 --- a/lustre/lfsck/lfsck_striped_dir.c +++ b/lustre/lfsck/lfsck_striped_dir.c @@ -2230,17 +2230,22 @@ repair: } next: - CDEBUG(D_LFSCK, "%s: namespace LFSCK repair the shard " - "%d "DFID" of the striped directory "DFID" with " - "dangling %s/%s, rename %s/%s, llinkea %s/%s, " - "repair_lmvea %s/%s: rc = %d\n", lfsck_lfsck2name(lfsck), - i, PFID(cfid), PFID(pfid), - create ? "yes" : "no", create_repaired ? "yes" : "no", - rename ? "yes" : "no", rename_repaired ? "yes" : "no", - repair_linkea ? "yes" : "no", - linkea_repaired ? "yes" : "no", - repair_lmvea ? "yes" : "no", - lmvea_repaired ? "yes" : "no", rc1); + if (create || rename || repair_linkea || repair_lmvea) { + CDEBUG(D_LFSCK, "%s: namespace LFSCK repair the shard " + "%d "DFID" of the striped directory "DFID" with " + "dangling %s/%s, rename %s/%s, llinkea %s/%s, " + "repair_lmvea %s/%s: rc = %d\n", + lfsck_lfsck2name(lfsck), + i, PFID(cfid), PFID(pfid), + create ? "yes" : "no", + create_repaired ? "yes" : "no", + rename ? "yes" : "no", + rename_repaired ? "yes" : "no", + repair_linkea ? "yes" : "no", + linkea_repaired ? "yes" : "no", + repair_lmvea ? "yes" : "no", + lmvea_repaired ? "yes" : "no", rc1); + } if (obj != NULL && !IS_ERR(obj)) { lfsck_object_put(env, obj);