summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota/src/quota.c
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-04-14 10:44:13 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-05-31 22:29:43 -0700
commit754df15ece18864adc5297c292c20a846804cbec (patch)
tree705917fbeab6303a2573bce85a8f0c876a9fbf8e /xlators/features/quota/src/quota.c
parentd9efe535c9ee0d01e0718d2bb871067785d33d14 (diff)
quota: retry connecting to quotad on ENOTCONN error
Suppose if there are two volumes vol1 and vol2, and quota is enabled and limit is set on vol1. Now if IO is happening on vol1 and quota is enabled/disabled on vol2, quotad gets restarted and client will receive ENOTCONN in the IO path of vol1. This patch will retry connecting to quotad upto 60sec in a interval of 5sec (12 retries) If not able to connect with 12 retries, then return ENOTCONN Change-Id: Ie7f5d108633ec68ba9cc3a6a61d79680485193e8 BUG: 1211220 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10230 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/quota/src/quota.c')
-rw-r--r--xlators/features/quota/src/quota.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index e19dfe97bb1..ba5e27bd235 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -171,6 +171,9 @@ quota_local_cleanup (xlator_t *this, quota_local_t *local)
if (local->xdata)
dict_unref (local->xdata);
+ if (local->validate_xdata)
+ dict_unref (local->validate_xdata);
+
if (local->stub)
call_stub_destroy (local->stub);
@@ -884,8 +887,7 @@ quota_validate (call_frame_t *frame, inode_t *inode, xlator_t *this,
goto err;
}
- ret = quota_enforcer_lookup (frame, this, &local->validate_loc, xdata,
- cbk_fn);
+ ret = quota_enforcer_lookup (frame, this, xdata, cbk_fn);
if (ret < 0) {
ret = -ENOTCONN;
goto err;