diff options
author | vmallika <vmallika@redhat.com> | 2015-04-14 10:44:13 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-06-04 01:48:31 -0700 |
commit | e29f29ac18dc20187934d3da75ea7b55c6dcfb37 (patch) | |
tree | 4ea7e6537d9c1956af8845d38f85f9004a804c13 /xlators/features/quota/src/quota.c | |
parent | fbb0fad96a51451f54369a85c7da3d02c14aff09 (diff) |
quota: retry connecting to quotad on ENOTCONN error
This is a backport of http://review.gluster.org/#/c/10230/
> 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>
Change-Id: I94d8d4a814a73d69e934f3e77e989e5f3bf2e65a
BUG: 1226789
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11024
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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 621e849bb7f..6d05273026a 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; |