path: root/xlators/mgmt/glusterd/src/glusterd-utils.h
diff options
authorKrishnan Parthasarathi <>2013-05-14 09:59:45 +0530
committerVijay Bellur <>2013-06-18 22:10:39 -0700
commitbb5ded9bee8cf7671bcb7c06e9ebca91f7bf8d67 (patch)
treefdf3e85a8a786ea5208302bd06c04318b06622f3 /xlators/mgmt/glusterd/src/glusterd-utils.h
parentbda60de187aadc885bbc705ccb9317f680f4b9d3 (diff)
glusterd: Disable transport before cleaning up rpc object
Problem: rpc_transport object, which is part of rpc_clnt, is destroyed prematurely. This is because, rpc_transport object is ref'd by socket layer and rpc layer. These ref's, until the synctask'izing of operations, were unref'd sequentially in the epoll thread. With more threads at play, the sequential unref guarantee is off. Fix: Shutting down the transport before proceeding with cleaning up of rpc_clnt object would serialize the unref's on the rpc_transport object and thus eliminating the race. Also, we don't store the address of brickinfo in brick's rpc notify function, to avoid the possibility of referring a freed brickinfo. Instead we use a string based id to 'reach' the corresponding brickinfo. Change-Id: If2739e2eeaee1e8b071ab2b6754b7ea0f81cfceb BUG: 962619 Signed-off-by: Krishnan Parthasarathi <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h
index 026d7e6..4739fab 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.h
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.h
@@ -117,6 +117,9 @@ glusterd_peer_hostname_new (char *hostname, glusterd_peer_hostname_t **name);
glusterd_volinfo_find (char *volname, glusterd_volinfo_t **volinfo);
+glusterd_volinfo_find_by_volume_id (uuid_t volume_id, glusterd_volinfo_t **volinfo);
glusterd_service_stop(const char *service, char *pidfile, int sig,
gf_boolean_t force_kill);