Whamcloud - gitweb
LU-14553 changelog: eliminate mdd_changelog_clear warning
authorOlaf Faaland <faaland1@llnl.gov>
Wed, 9 Mar 2022 08:01:20 +0000 (00:01 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 9 Mar 2022 17:13:06 +0000 (17:13 +0000)
When handling a changelog_clear request, the user may specify a
range of indices which do not exist.  Similarly, the user may
specify a changelog user which does not exist.  Neither indicates
a problem within Lustre that justifies a a console warning.

Change those cases to CDEBUG.

Lustre-change: https://review.whamcloud.com/43125
Lustre-commit: 6b183927e19715d093c80a35ebc42a1cda5e70e2

Test-Parameters: trivial
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Change-Id: I64bab12ef4978c4bf7139f5f36a39f9b109616fb
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46758
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mdd/mdd_device.c

index 2409df8..e691ca3 100644 (file)
@@ -2142,7 +2142,11 @@ static int mdd_changelog_clear(const struct lu_env *env,
                              mdd_changelog_clear_cb, (void *)&mcuc,
                              0, 0);
 
-       if (rc < 0) {
+       if (rc == -EINVAL) {
+               CDEBUG(D_IOCTL, "%s: No changelog recnum <= %llu to clear\n",
+                      mdd2obd_dev(mdd)->obd_name, (unsigned long long) endrec);
+               RETURN(-EINVAL);
+       } else if (rc < 0) {
                CWARN("%s: Failure to clear the changelog for user %d: %d\n",
                      mdd2obd_dev(mdd)->obd_name, id, rc);
        } else if (mcuc.mcuc_flush) {
@@ -2157,7 +2161,7 @@ static int mdd_changelog_clear(const struct lu_env *env,
                                                      mcuc.mcuc_minrec);
                }
        } else {
-               CWARN("%s: No entry for user %d\n",
+               CDEBUG(D_IOCTL, "%s: No entry for user %d\n",
                      mdd2obd_dev(mdd)->obd_name, id);
                rc = -ENOENT;
        }