summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2014-02-11 10:07:24 +0530
committerVijay Bellur <vbellur@redhat.com>2014-04-29 09:37:32 -0700
commit5e4a5a4c27f120102d4c2e3c7d558a20d838cf24 (patch)
tree9819acc18296b122a06dd3a53a16d20f80b86f81 /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent16e71bf8b76eb421e30f5fe239601ba85710c983 (diff)
cli: Add a cli command to enable/disable barrier
This patch adds a new 'gluster volume barrier <VOLNAME> {enable|disable}' cli command. This helps in testing the brick op code path when testing the barrier xlator. This patch can be reverted later if not required for end users. Change-Id: Icd86a2d13e7f276dda1ecbb2593d60638ece7dcd BUG: 1060002 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/6958 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index ae095bf7c63..6ce38e91b5b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3656,7 +3656,7 @@ glusterd_create_rb_volfiles (glusterd_volinfo_t *volinfo,
}
int
-glusterd_create_volfiles_and_notify_services (glusterd_volinfo_t *volinfo)
+glusterd_create_volfiles (glusterd_volinfo_t *volinfo)
{
int ret = -1;
xlator_t *this = NULL;
@@ -3678,11 +3678,25 @@ glusterd_create_volfiles_and_notify_services (glusterd_volinfo_t *volinfo)
}
ret = generate_client_volfiles (volinfo, GF_CLIENT_OTHER);
- if (ret) {
+ if (ret)
gf_log (this->name, GF_LOG_ERROR,
"Could not generate client volfiles");
+
+out:
+ return ret;
+}
+
+int
+glusterd_create_volfiles_and_notify_services (glusterd_volinfo_t *volinfo)
+{
+ int ret = -1;
+ xlator_t *this = NULL;
+
+ this = THIS;
+
+ ret = glusterd_create_volfiles (volinfo);
+ if (ret)
goto out;
- }
ret = glusterd_fetchspec_notify (this);