summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client.h
diff options
context:
space:
mode:
authorMohammed Junaid <junaid@redhat.com>2012-03-19 21:07:33 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-19 09:05:58 -0700
commit55c22fbfae259bff3b0e0cca192f709b74d8bee5 (patch)
tree257ad0e4e271e6be533fdf7444364ab59071ae3b /xlators/protocol/client/src/client.h
parent83277598bda524f44b76feed6adc7b19fc49d49a (diff)
protocol/client: Handle failures in lock self healing gracefully (part 1).
During reopening of fd's and reacquiring of locks on the fd (after a reconnect), a release on a fd on which reacquiring of locks is in progress will free up fdctx. This patch will keep fdctx valid until the reacquiring of locks is in progress. Change-Id: I0464c751a5aa986abac0b72b48b261fceeba24e8 BUG: 795386 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.com/2937 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/protocol/client/src/client.h')
-rw-r--r--xlators/protocol/client/src/client.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
index 352d2b371..91a411e8a 100644
--- a/xlators/protocol/client/src/client.h
+++ b/xlators/protocol/client/src/client.h
@@ -38,6 +38,11 @@
#define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB)
#define GF_MIN_SOCKET_WINDOW_SIZE (0)
+typedef enum {
+ GF_LK_HEAL_IN_PROGRESS,
+ GF_LK_HEAL_DONE,
+} lk_heal_state_t;
+
#define CLIENT_GET_REMOTE_FD(conf, fd, remote_fd, op_errno, label) \
do { \
clnt_fd_ctx_t *fdctx = NULL; \
@@ -129,6 +134,7 @@ typedef struct _client_fd_ctx {
int32_t wbflags;
fd_lk_ctx_t *lk_ctx;
pthread_mutex_t mutex;
+ lk_heal_state_t lk_heal_state;
struct list_head lock_list; /* List of all granted locks on this fd */
} clnt_fd_ctx_t;