diff options
| author | Atin Mukherjee <amukherj@redhat.com> | 2014-12-12 07:21:19 +0530 |
|---|---|---|
| committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-02-26 04:00:32 -0800 |
| commit | a1d9f01b28267fc333aebc49cb81ee69dc2c24f8 (patch) | |
| tree | e8fd41b5616c8f76178d4664b877dafd2ed6ca66 /xlators/mgmt/glusterd/src/glusterd-utils.h | |
| parent | 642355b50e792aa7b309122c871731ad887a97c0 (diff) | |
glusterd: Maintain per transaction xaction_peers list in syncop & mgmt_v3
In current implementation xaction_peers list is maintained in a global variable
(glustrd_priv_t) for syncop/mgmt_v3. This means consistency and atomicity of
peerinfo list across transactions is not guranteed when multiple syncop/mgmt_v3
transaction are going through.
We had got into a problem in mgmt_v3-locks.t which was failing spuriously, the
reason for that was two volume set operations (in two different volume) was
going through simultaneouly and both of these transaction were manipulating the
same xaction_peers structure which lead to a corrupted list. Because of which in
some cases unlock request to peer was never triggered and we end up with having
stale locks.
Solution is to maintain a per transaction local xaction_peers list for every
syncop.
Please note I've identified this problem in op-sm area as well and a separate
patch will be attempted to fix it.
Finally thanks to Krishnan Parthasarathi and Kaushal M for your constant help to
get to the root cause.
Backport URL : http://review.gluster.org/#/c/9269/
http://review.gluster.org/#/c/9422/
http://review.gluster.org/#/c/9350/
Change-Id: Ib1eaac9e5c8fc319f4e7f8d2ad965bc1357a7c63
BUG: 1176756
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/9269
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/9328
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 368b6627159..636f72613d9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -566,7 +566,8 @@ glusterd_do_quorum_action (); int glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count, int *quorum_count, - gf_boolean_t _xaction_peers); + struct list_head *peer_list, + gf_boolean_t _local__xaction_peers); int glusterd_get_next_global_opt_version_str (dict_t *opts, char **version_str); @@ -577,7 +578,9 @@ glusterd_is_volume_in_server_quorum (glusterd_volinfo_t *volinfo); gf_boolean_t glusterd_is_any_volume_in_server_quorum (xlator_t *this); gf_boolean_t -does_gd_meet_server_quorum (xlator_t *this, gf_boolean_t _xaction_peers); +does_gd_meet_server_quorum (xlator_t *this, + struct list_head *peers_list, + gf_boolean_t _local__xaction_peers); int glusterd_generate_and_set_task_id (dict_t *dict, char *key); @@ -785,11 +788,13 @@ glusterd_take_lvm_snapshot (glusterd_brickinfo_t *brickinfo, int32_t glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume, - char **op_errstr); + char **op_errstr, + struct list_head *peers_list); int32_t glusterd_snap_quorum_check_for_create (dict_t *dict, gf_boolean_t snap_volume, - char **op_errstr); + char **op_errstr, + struct list_head *peers_list); int32_t glusterd_volume_quorum_check (glusterd_volinfo_t *volinfo, int64_t index, |
