summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.h
diff options
context:
space:
mode:
authorKotresh H R <khiremat@redhat.com>2014-08-08 17:17:20 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-08-21 04:53:14 -0700
commitbbb7da5abe6b7275d9b633f8ad7692a4f2132c71 (patch)
tree156d51726d768bfda1a4b0b5c57d7bbc10e6d986 /xlators/mgmt/glusterd/src/glusterd-utils.h
parent33be39b42f3b9b0505f83a509ff87d416e106158 (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. Change-Id: I2b5de7dd686541c6b89c0fd0f7a4dbc92eecfac5 BUG: 1129008 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>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h
index 6fe7aef92a9..2e06c2a6341 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.h
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.h
@@ -763,6 +763,9 @@ glusterd_get_geo_rep_session (char *slave_key, char *origin_volname,
int32_t
glusterd_restore_geo_rep_files (glusterd_volinfo_t *snap_vol);
+gf_boolean_t
+gd_vol_is_geo_rep_active (glusterd_volinfo_t *volinfo);
+
int32_t
glusterd_copy_quota_files (glusterd_volinfo_t *src_vol,
glusterd_volinfo_t *dest_vol);