summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-04-21 07:08:28 +0000
committerAnand Avati <avati@gluster.com>2011-04-21 07:38:33 -0700
commit81c04158559f9f61ff0581544541cc18778cb1de (patch)
tree1ed6e9a875331596a40c848b3b1fdfd88973b3ab /xlators/features/quota
parent2c12b90a84c544343e384e1d60d03b10be9fc45b (diff)
prevent few excessive logs
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'xlators/features/quota')
-rw-r--r--xlators/features/quota/src/quota.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index dc936b284..5d1f304f4 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -1489,8 +1489,10 @@ quota_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
size = buf->ia_blocks * 512;
}
- quota_update_size (this, local->oldloc.parent, NULL, 0, (-size));
- quota_update_size (this, local->newloc.parent, NULL, 0, size);
+ if (local->oldloc.parent != local->newloc.parent) {
+ quota_update_size (this, local->oldloc.parent, NULL, 0, (-size));
+ quota_update_size (this, local->newloc.parent, NULL, 0, size);
+ }
if (!(IA_ISREG (local->oldloc.inode->ia_type)
|| IA_ISLNK (local->oldloc.inode->ia_type))) {
@@ -2083,7 +2085,7 @@ quota_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
quota_inode_ctx_get (local->loc.inode, -1, this, NULL, NULL,
&ctx, 0);
if (ctx == NULL) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_DEBUG,
"quota context not set in inode (ino:%"PRId64
", gfid:%s)", local->loc.inode->ino,
uuid_utoa (local->loc.inode->gfid));
@@ -2416,7 +2418,7 @@ quota_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
quota_inode_ctx_get (local->loc.inode, -1, this, NULL, NULL,
&ctx, 0);
if (ctx == NULL) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_DEBUG,
"quota context not set in inode (ino:%"PRId64
", gfid:%s)", local->loc.inode->ino,
uuid_utoa (local->loc.inode->gfid));