From a0b148ea4e2a0163548eeb89b7580be4adbb8070 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Sat, 23 Jan 2010 05:14:31 +0000 Subject: Server backend storage hang should not cause the mount point to hang. Submitted-by: Krishna Srinivas NOTE: fixed compilation issues in posix.c introduced while merging storage/posix polls for FS/kernel being functional by issuing statvfs() call. In case statvfs expires the timer, storage/posix will send CHILD_DOWN to upper translator. Ultimately this will cause protocol/server to disconnect all clients connected and also cleans up the data structures. Hence if soft lockup or other kernel bug causes backend FS to hang, the clients will not be hung. Signed-off-by: Krishna Srinivas Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati BUG: 272 (Server backend storage hang should not cause the mount point to hang) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=272 --- xlators/protocol/server/src/server-protocol.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/server/src/server-protocol.h') diff --git a/xlators/protocol/server/src/server-protocol.h b/xlators/protocol/server/src/server-protocol.h index 78bc13827..73e7f7891 100644 --- a/xlators/protocol/server/src/server-protocol.h +++ b/xlators/protocol/server/src/server-protocol.h @@ -37,6 +37,7 @@ #define DEFAULT_BLOCK_SIZE 4194304 /* 4MB */ #define DEFAULT_VOLUME_FILE_PATH CONFDIR "/glusterfs.vol" +#define TRANSPORTS_PER_SERVER_CONN 2 typedef struct _server_state server_state_t; @@ -64,6 +65,7 @@ struct _server_connection { char *id; int ref; int active_transports; + transport_t *transports[TRANSPORTS_PER_SERVER_CONN]; pthread_mutex_t lock; char disconnected; fdtable_t *fdtable; @@ -75,7 +77,7 @@ typedef struct _server_connection server_connection_t; server_connection_t * -server_connection_get (xlator_t *this, const char *id); +server_connection_get (xlator_t *this, const char *id, transport_t *trans); void server_connection_put (xlator_t *this, server_connection_t *conn); @@ -84,7 +86,7 @@ int server_connection_destroy (xlator_t *this, 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, transport_t *trans); int server_nop_cbk (call_frame_t *frame, void *cookie, @@ -107,6 +109,7 @@ typedef struct { pthread_mutex_t mutex; struct list_head conns; gf_boolean_t verify_volfile_checksum; + char *subvol_list; gf_boolean_t trace; } server_conf_t; -- cgit