diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-03-18 13:07:30 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-03-18 01:09:43 -0700 |
commit | 9fd44bd90ecb60760919bda85308132341f857f9 (patch) | |
tree | 0ed134e638c906ca8ae66153a1f5f00ddde28c12 /xlators/protocol/server/src/server.h | |
parent | f20d895a8ed2a3ee032bd0f85d5bfaf645575fd7 (diff) |
protocol/server: Clear internal locks on disconnect
If there is a disconnect observed on the client when the
inode/entry unlock is issued, but the reconnection to server
happens with in the grace-time period the inode/entry lk will
live and the unlock will never come from that client.
The internal locks should be cleared on disconnect.
Change-Id: Ib45b1035cfe3b1de381ef3b331c930011e7403be
BUG: 803209
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2966
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/protocol/server/src/server.h')
-rw-r--r-- | xlators/protocol/server/src/server.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h index 831c309a245..4213faa174d 100644 --- a/xlators/protocol/server/src/server.h +++ b/xlators/protocol/server/src/server.h @@ -35,6 +35,11 @@ #define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB) #define GF_MIN_SOCKET_WINDOW_SIZE (0) +typedef enum { + INTERNAL_LOCKS = 1, + POSIX_LOCKS = 2, +} server_lock_flags_t; + typedef struct _server_state server_state_t; struct _locker { @@ -86,7 +91,8 @@ server_connection_t* server_conn_ref (server_connection_t *conn); int -server_connection_cleanup (xlator_t *this, server_connection_t *conn); +server_connection_cleanup (xlator_t *this, server_connection_t *conn, + int32_t flags); int server_null (rpcsvc_request_t *req); |