Whamcloud - gitweb
LU-13399 lfsck: tune lfsck repair message 00/38100/3
authorAlexander Zarochentsev <c17826@cray.com>
Tue, 3 Mar 2020 20:50:39 +0000 (23:50 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Apr 2020 08:11:09 +0000 (08:11 +0000)
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 <alexander.zarochentsev@hpe.com>
Change-Id: I34cc79f59eb76c1f6a86baeed81f8372c133b746
Reviewed-on: https://review.whamcloud.com/38100
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lfsck/lfsck_striped_dir.c

index e451a38..b2459af 100644 (file)
@@ -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);