From 41263d553f25e4f59d2751e7e3b2a23b264370f8 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Tue, 14 Jun 2011 23:56:01 +0000 Subject: features/marker-quota: use contribution value to reduce parent's size, if the value to be subtracted is not passed as argument to reduce_parent_size. Signed-off-by: Raghavendra G 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xlators/features/marker/src/marker-quota.c') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 5fb933074..4a2193102 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -2134,7 +2134,11 @@ reduce_parent_size (xlator_t *this, loc_t *loc, int64_t contri) if (contri >= 0) { local->size = contri; } else { - local->size = -1; + LOCK (&contribution->lock); + { + local->size = contribution->contribution; + } + UNLOCK (&contribution->lock); } if (local->size == 0) { -- cgit