summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota/src/quota.h
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.h
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.h')
-rw-r--r--xlators/features/quota/src/quota.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h
index e80316cdeff..1d0db0d95da 100644
--- a/xlators/features/quota/src/quota.h
+++ b/xlators/features/quota/src/quota.h
@@ -209,6 +209,9 @@ struct quota_local {
quota_ancestry_built_t ancestry_cbk;
void *ancestry_data;
dict_t *xdata;
+ dict_t *validate_xdata;
+ int32_t quotad_conn_retry;
+ xlator_t *this;
};
typedef struct quota_local quota_local_t;
@@ -227,12 +230,17 @@ struct quota_priv {
inode_table_t *itable;
char *volume_uuid;
uint64_t validation_count;
+ int32_t quotad_conn_status;
};
typedef struct quota_priv quota_priv_t;
int
-quota_enforcer_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *xdata, fop_lookup_cbk_t cbk);
+quota_enforcer_lookup (call_frame_t *frame, xlator_t *this, dict_t *xdata,
+ fop_lookup_cbk_t cbk);
+
+void
+_quota_enforcer_lookup (void *data);
+
struct rpc_clnt *
quota_enforcer_init (xlator_t *this, dict_t *options);