diff options
author | Vijaikumar M <vmallika@redhat.com> | 2014-05-23 14:42:08 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2014-06-05 10:11:45 -0700 |
commit | 42b956971c47fd0708cbbd17ce8c78c2ed79bfba (patch) | |
tree | c8056e730ff7277a6a323aad85ac8874862e4099 /rpc/rpc-transport/socket/src/socket-mem-types.h | |
parent | a89e35727e3a9a7226c7a16479935b7109b11663 (diff) |
glusterd: Handle rpc_connect failure in the event handler
Currently rpc_connect calls the notification function on failure in the
same thread, glusterd notification holds the big_lock and
hence big_lock is released before rpc_connect
In snapshot creation, releasing the big-lock before completeing
operation can cause problem like deadlock or memory corruption.
Bricks are started as part of snapshot created operation.
brick_start releases the big_lock when doing brick_connect and this
might cause glusterd crash.
There is a similar issue in bug# 1088355.
Solution is let the event handler handle the failure than doing it in
the rpc_connect.
Change-Id: I088d44092ce845a07516c1d67abd02b220e08b38
BUG: 1101507
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/7843
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
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 'rpc/rpc-transport/socket/src/socket-mem-types.h')
-rw-r--r-- | rpc/rpc-transport/socket/src/socket-mem-types.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket-mem-types.h b/rpc/rpc-transport/socket/src/socket-mem-types.h new file mode 100644 index 00000000000..e5553b172a2 --- /dev/null +++ b/rpc/rpc-transport/socket/src/socket-mem-types.h @@ -0,0 +1,21 @@ +/* + Copyright (c) 2008-2014 Red Hat, Inc. <http://www.redhat.com> + This file is part of GlusterFS. + + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ + +#ifndef __SOCKET_MEM_TYPES_H__ +#define __SOCKET_MEM_TYPES_H__ + +#include "mem-types.h" + +typedef enum gf_sock_mem_types_ { + gf_sock_connect_error_state_t = gf_common_mt_end + 1, + gf_sock_mt_end +} gf_sock_mem_types_t; + +#endif |