diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-02-18 15:16:17 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-02 01:16:51 -0800 |
commit | efe09fff57dc01088168e60bff355b769c1bc7f7 (patch) | |
tree | a8ff03567df05b6e25f33d4abef3ce55ed117db2 /xlators/protocol/client/src/client.h | |
parent | 60cff8ab4f5fa2ee7bea028937ba23674e1ee0cc (diff) |
protocol/client: defer cleanup of private until RPC notifications are handled.
This fix is required for glfs_fini to be able to perform fini on client
xlators in a graph. We are deferring freeing of client xlator's private
until all RPC related resources are destroyed. This guarantees that
client xlator would free RPC related resources provided its private
structures are still accessible via its this pointer.
'Weak' property: If there are no epoll threads executing after calling
fini() on a client xlator, then all its RPC related resources are
guaranteed to be freed. We can now free the corresponding 'this'
pointer.
Change-Id: Ie00b14dda096ac128e1c37e0032f07d17fd701ce
BUG: 1093594
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/9680
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client.h')
-rw-r--r-- | xlators/protocol/client/src/client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h index 1aea1353727..7157e120dda 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -128,6 +128,9 @@ typedef struct clnt_conf { int event_threads; /* # of event threads * configured */ + + gf_boolean_t destroy; /* if enabled implies fini was called + * on @this xlator instance */ } clnt_conf_t; typedef struct _client_fd_ctx { |