From 74697128b4bbf2c6bb501ce6f75cad103faa8e68 Mon Sep 17 00:00:00 2001
From: vmallika <vmallika@redhat.com>
Date: Mon, 15 Jun 2015 11:21:12 +0530
Subject: [PATCH 259/279] quota: don't log error when disk quota exceeded
This is a backport of http://review.gluster.org/11135
When disk quota exceeded, quota enforcer logs
alert message, so no need to log error message
as this can fill up the log file
> Change-Id: Ia913f47bc0cedb7c0a9c611330ee5124d3bb6c9d
> BUG: 1229609
> Signed-off-by: vmallika <vmallika@redhat.com>
> Reviewed-on: http://review.gluster.org/11135
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
> Tested-by: Raghavendra G <rgowdapp@redhat.com>
BUG: 1229606
Change-Id: I3d0b6a2aec45b350093625db3c1b053d0c331846
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/55059
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
Tested-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
---
xlators/features/quota/src/quota.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 16ad0fc..a444713 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -1108,6 +1108,7 @@ quota_check_object_limit (call_frame_t *frame, quota_inode_ctx_t *ctx,
local->op_ret = -1;
local->op_errno = EDQUOT;
*op_errno = EDQUOT;
+ goto out;
}
/*We log usage only if quota limit is configured on
@@ -1292,9 +1293,10 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
goto done;
if (ret) {
- gf_msg (this->name, GF_LOG_ERROR, 0,
- Q_MSG_ENFORCEMENT_FAILED, "Failed to check "
- "quota object limit");
+ if (op_errno != EDQUOT)
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ Q_MSG_ENFORCEMENT_FAILED, "Failed to "
+ "check quota object limit");
goto err;
}
@@ -1305,9 +1307,10 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
goto done;
if (ret) {
- gf_msg (this->name, GF_LOG_ERROR, 0,
- Q_MSG_ENFORCEMENT_FAILED, "Failed to check "
- "quota size limit");
+ if (op_errno != EDQUOT)
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ Q_MSG_ENFORCEMENT_FAILED, "Failed to "
+ "check quota size limit");
goto err;
}
--
1.7.1