From b7aeaa619b82509fbe8d187bbc1618cb319d6877 Mon Sep 17 00:00:00 2001 From: Junaid Date: Mon, 20 Jun 2011 07:11:47 +0000 Subject: features/marker-quota: Skip contribution creation on root. Signed-off-by: Junaid Signed-off-by: Anand Avati 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 --- xlators/features/marker/src/marker-quota.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'xlators/features/marker') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 4a219310231..1872937a79a 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, -- cgit