diff options
author | vmallika <vmallika@redhat.com> | 2015-06-15 11:21:12 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-06-15 06:38:00 -0700 |
commit | 8e5fa4d025492762db566634b7493148a92f6d05 (patch) | |
tree | b162fc00338b5195a1c58d909ff6216a19544c90 | |
parent | 379dbbfd683d2b0e1704c098b1f020567328122c (diff) |
quota: don't log error when disk quota exceeded
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>
-rw-r--r-- | 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 4dc6da0e07d..c99ac12d128 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -1020,6 +1020,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 @@ -1195,9 +1196,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; } @@ -1208,9 +1210,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; } |