summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.h
diff options
context:
space:
mode:
authorKotresh H R <khiremat@redhat.com>2014-08-08 17:17:20 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-08 20:08:08 -0700
commitd5c5a83d449b3c78405f7cbcab2c4dd6f0b0d896 (patch)
treee337b1462ccbe1ec156bc26c9d9943c550bcec2f /xlators/mgmt/glusterd/src/glusterd.h
parentabf0343e9dada8b119a212db5b24e8a8712a8c4f (diff)
geo-rep/glusterd: API to check active geo-rep session for the volume
Requirement: Snapshot needs an API to fail the CLI if any geo-rep session is active for that volume. Solution: A function "gd_vol_is_geo_rep_active" is provided to check if any geo-rep session is active for that volume. An in memory dict called 'gsync_running_slaves' is maintained in 'volinfo' structure to keep track of active geo-rep session for the volume. The key 'slavenode::slavevol' with value 'running' is added whenever geo-rep is started/resumed into the dict and the same is removed if stopped/paused. So the 'count' in dict is used to decide whether the geo-rep is active or not for that volume. Also added "this->name" in gf_log in routines which this patch is touched. BUG: 1138952 Change-Id: Ib13aeb509a56edf510651b77e20bf3cc43a3e763 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/8459 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/8645 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 16745688868..f2f7a0a277c 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -368,6 +368,7 @@ struct glusterd_volinfo_ {
char *logdir;
dict_t *gsync_slaves;
+ dict_t *gsync_active_slaves;
int decommission_in_progress;
xlator_t *xl;