diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-06-14 23:56:01 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-16 22:01:48 -0700 |
commit | 41263d553f25e4f59d2751e7e3b2a23b264370f8 (patch) | |
tree | d5d9f1a723cc651af35d293f21658864340d0282 | |
parent | cd2518b4ab627471db74d7f4a473416f318754db (diff) |
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 <raghavendra@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
-rw-r--r-- | xlators/features/marker/src/marker-quota.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 5fb933074a4..4a219310231 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) { |