path: root/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
diff options
authorAvra Sengupta <>2014-03-03 23:07:23 +0000
committerRajesh Joseph <>2014-03-07 04:30:44 -0800
commitb121434902d5839938045294cfdfe2a86e01a951 (patch)
treefed315406ccacf20bf13454a4d3601760c88fcad /xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
parent44428343529bec83fab0e3519396471fc8f651b4 (diff)
glusterd/mgmt_v3 locks: Handling different entities with mgmt_v3_locks.
Within the same namespace allowing mgmt_v3 lock engine to handle entities of valid types. Postfixing the element's name with the entity type allows us to perform locking operations on different elements of different entitites at the same time. For example: A volume named test, will acquire a lock on the name test_vol, while a snap named test will acquire lock on the name test_snap, and thus be allowed to co-exist in the same namespace. Change-Id: I611d1a59b707e497d35a37bdca5a66e29a1b6f06 Signed-off-by: Avra Sengupta <> Reviewed-on: Reviewed-by: Rajesh Joseph <> Tested-by: Rajesh Joseph <>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
index 72181e963..5077a0092 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c
@@ -74,7 +74,7 @@ glusterd_synctasked_mgmt_v3_lock (rpcsvc_request_t *req,
"Failed to get volname");
goto out;
- ret = glusterd_mgmt_v3_lock (volname, ctx->uuid);
+ ret = glusterd_mgmt_v3_lock (volname, ctx->uuid, "vol");
if (ret)
gf_log (this->name, GF_LOG_ERROR,
@@ -755,7 +755,7 @@ glusterd_synctasked_mgmt_v3_unlock (rpcsvc_request_t *req,
"Failed to get volname");
goto out;
- ret = glusterd_mgmt_v3_unlock (volname, ctx->uuid);
+ ret = glusterd_mgmt_v3_unlock (volname, ctx->uuid, "vol");
if (ret)
gf_log (this->name, GF_LOG_ERROR,
"Unable to release lock for %s", volname);