summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota/src/quota.c
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-06-09 12:57:29 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-17 05:16:23 -0700
commit08e404e9d397004ad24f3734862632fbeb66f2b0 (patch)
tree37e9fdcd4beda2790b14b21169f65358056684fa /xlators/features/quota/src/quota.c
parent2dcc68df252f9f8313eb8f8b2e1e97f539426643 (diff)
quota: don't log error when disk quota exceeded
This is a backport of http://review.gluster.org/#/c/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> Change-Id: I7b0b91965d8eb1b38ef6fa5ce0276a6b6da3372d BUG: 1232135 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11242 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/quota/src/quota.c')
-rw-r--r--xlators/features/quota/src/quota.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 569b3c00aa4..6e2b3eaf4b4 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -1009,6 +1009,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
@@ -1184,8 +1185,11 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
goto done;
if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "Failed to check "
- "quota object limit");
+ if (op_errno != EDQUOT)
+ gf_log (this->name, GF_LOG_ERROR, "Failed to "
+ "check quota object limit: %s",
+ strerror (op_errno));
+
goto err;
}
@@ -1196,8 +1200,10 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
goto done;
if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "Failed to check "
- "quota size limit");
+ if (op_errno != EDQUOT)
+ gf_log (this->name, GF_LOG_ERROR, "Failed to "
+ "check quota size limit: %s",
+ strerror (op_errno));
goto err;
}