diff options
author | Avra Sengupta <asengupt@redhat.com> | 2014-03-03 23:07:23 +0000 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2014-03-07 04:30:44 -0800 |
commit | b121434902d5839938045294cfdfe2a86e01a951 (patch) | |
tree | fed315406ccacf20bf13454a4d3601760c88fcad /xlators/mgmt/glusterd/src/glusterd-locks.h | |
parent | 44428343529bec83fab0e3519396471fc8f651b4 (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 <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7188
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-locks.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-locks.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-locks.h b/xlators/mgmt/glusterd/src/glusterd-locks.h index 71339ed7f..9ca332fe9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-locks.h +++ b/xlators/mgmt/glusterd/src/glusterd-locks.h @@ -29,10 +29,10 @@ int32_t glusterd_get_mgmt_v3_lock_owner (char *volname, uuid_t *uuid); int32_t -glusterd_mgmt_v3_lock (char *key, uuid_t uuid); +glusterd_mgmt_v3_lock (const char *key, uuid_t uuid, char *type); int32_t -glusterd_mgmt_v3_unlock (char *key, uuid_t uuid); +glusterd_mgmt_v3_unlock (const char *key, uuid_t uuid, char *type); int32_t glusterd_multiple_mgmt_v3_lock (dict_t *dict, uuid_t uuid); |