diff options
author | Kaushal M <kaushal@redhat.com> | 2012-09-03 16:51:06 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-10-31 02:35:37 -0700 |
commit | abc8e5b01bff976e1f6b3c1e2747a2a341bf0f64 (patch) | |
tree | 13bd5813579b4b80a9cd00a2af5fd35f9bc3ef8f /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 0608244512f1ab0ba9916ab3da9f0bc57ee234fc (diff) |
glusterd: 'volume set' changes for op-version support
An op-version check is performed for the given keys during stage. The commit
phase moves the cluster op-version to the required version if needed.
Change-Id: Id5c387094dbec723df736b2ecdc49ff93c179e0e
BUG: 814534
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/3780
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 25fb5cba7ea..fab405c7f7d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -6319,3 +6319,18 @@ glusterd_volume_heal_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict) out: return ret; } + +/* Should be used only when an operation is in progress, as that is the only + * time a lock_owner is set + */ +gf_boolean_t +is_origin_glusterd () { + int ret = 0; + uuid_t lock_owner = {0,}; + + ret = glusterd_get_lock_owner (&lock_owner); + if (ret) + return _gf_false; + + return (uuid_compare (MY_UUID, lock_owner) == 0); +} |