path: root/xlators/features/quota
diff options
authorKrishnan Parthasarathi <>2015-06-27 11:04:25 +0530
committerKaushal M <>2015-08-14 03:10:47 -0700
commit6d3d4dba5276aea924ec275ae00b69c70fa975c0 (patch)
tree0c5266847e01edb79cfeeb7363babd739c5c71b2 /xlators/features/quota
parentfc3da7299dc2adaf66076bfbfebe4a87582f7008 (diff)
rpc: add owner xlator argument to rpc_clnt_new
The @owner argument tells RPC layer the xlator that owns the connection and to which xlator THIS needs be set during network notifications like CONNECT and DISCONNECT. Code paths that originate from the head of a (volume) graph and use STACK_WIND ensure that the RPC local endpoint has the right xlator saved in the frame of the call (callback pair). This guarantees that the callback is executed in the right xlator context. The client handshake process which includes fetching of brick ports from glusterd, setting lk-version on the brick for the session, don't have the correct xlator set in their frames. The problem lies with RPC notifications. It doesn't have the provision to set THIS with the xlator that is registered with the corresponding RPC programs. e.g, RPC_CLNT_CONNECT event received by protocol/client doesn't have THIS set to its xlator. This implies, call(-callbacks) originating from this thread don't have the right xlator set too. The fix would be to save the xlator registered with the RPC connection during rpc_clnt_new. e.g, protocol/client's xlator would be saved with the RPC connection that it 'owns'. RPC notifications such as CONNECT, DISCONNECT, etc inherit THIS from the RPC connection's xlator. Change-Id: I9dea2c35378c511d800ef58f7fa2ea5552f2c409 BUG: 1253212 Signed-off-by: Krishnan Parthasarathi <> Reviewed-on: Tested-by: Gluster Build System <> Tested-by: NetBSD Build System <> Reviewed-by: Raghavendra G <> (cherry picked from commit f7668938cd7745d024f3d2884e04cd744d0a69ab) Reviewed-on: Reviewed-by: Pranith Kumar Karampuri <>
Diffstat (limited to 'xlators/features/quota')
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota-enforcer-client.c b/xlators/features/quota/src/quota-enforcer-client.c
index 067db6d4b76..10bd24f3916 100644
--- a/xlators/features/quota/src/quota-enforcer-client.c
+++ b/xlators/features/quota/src/quota-enforcer-client.c
@@ -453,7 +453,7 @@ quota_enforcer_init (xlator_t *this, dict_t *options)
if (ret)
goto out;
- rpc = rpc_clnt_new (options, this->ctx, this->name, 16);
+ rpc = rpc_clnt_new (options, this, this->name, 16);
if (!rpc) {
ret = -1;
goto out;