summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.c
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-06-20 07:11:47 +0000
committerAnand Avati <avati@gluster.com>2011-06-23 21:50:25 -0700
commitb7aeaa619b82509fbe8d187bbc1618cb319d6877 (patch)
tree9ffeca7c2846345f7998ef8d1f7f95d5d2674895 /xlators/features/marker/src/marker-quota.c
parent83d1f9642e7310f085caaeb0c5b72a88c445d31b (diff)
features/marker-quota: Skip contribution creation on root.
Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2697 (Quota: add-brick creates the size go awkward, though it was perfect earlier) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2697
Diffstat (limited to 'xlators/features/marker/src/marker-quota.c')
-rw-r--r--xlators/features/marker/src/marker-quota.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 4a2193102..1872937a7 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -936,16 +936,18 @@ quota_create_xattr (xlator_t *this, call_frame_t *frame)
goto free_size;
}
- contri = add_new_contribution_node (this, ctx, &local->loc);
- if (contri == NULL)
- goto err;
+ if (strcmp (local->loc.path, "/") != 0) {
+ contri = add_new_contribution_node (this, ctx, &local->loc);
+ if (contri == NULL)
+ goto err;
- QUOTA_ALLOC_OR_GOTO (value, int64_t, ret, err);
- GET_CONTRI_KEY (key, local->loc.parent->gfid, ret);
+ QUOTA_ALLOC_OR_GOTO (value, int64_t, ret, err);
+ GET_CONTRI_KEY (key, local->loc.parent->gfid, ret);
- ret = dict_set_bin (dict, key, value, 8);
- if (ret < 0)
- goto free_value;
+ ret = dict_set_bin (dict, key, value, 8);
+ if (ret < 0)
+ goto free_value;
+ }
STACK_WIND (frame, create_dirty_xattr, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->xattrop, &local->loc,