From 08e404e9d397004ad24f3734862632fbeb66f2b0 Mon Sep 17 00:00:00 2001 From: vmallika Date: Tue, 9 Jun 2015 12:57:29 +0530 Subject: 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 Change-Id: I7b0b91965d8eb1b38ef6fa5ce0276a6b6da3372d BUG: 1232135 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/11242 Tested-by: Gluster Build System Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- xlators/features/quota/src/quota.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'xlators/features/quota') 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; } -- cgit