From c72bc2ece963b41f95ada7d50b9dcab76a0ad77d Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Wed, 9 Mar 2022 00:01:20 -0800 Subject: [PATCH] LU-14553 changelog: eliminate mdd_changelog_clear warning 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 Change-Id: I64bab12ef4978c4bf7139f5f36a39f9b109616fb Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/46758 Tested-by: jenkins Tested-by: Maloo --- lustre/mdd/mdd_device.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 2409df8..e691ca3 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -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; } -- 1.8.3.1