summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2012-10-10 17:57:20 +0530
committerAnand Avati <avati@redhat.com>2012-10-10 19:10:50 -0700
commit15396f490d23c665d51a64a049679cb40472ab05 (patch)
treea57e6d50918c9a7d546e1a8bdabcff4eaac5272d /xlators/mgmt/glusterd/src/glusterd-brick-ops.c
parent144db7f39f35a51c24558c81faea3f49c237312f (diff)
glusterd: glusterd_brick_stop should be race free wrt pmap
This is important for the effort to make glusterd use synctask framework. Change-Id: I0affb10a342df99df8daccfd6eef8fa6dd63928c BUG: 862834 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4057 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index b32c9872ac3..5d59fadf3e1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -980,14 +980,14 @@ glusterd_op_perform_remove_brick (glusterd_volinfo_t *volinfo, char *brick,
if (force) {
if (GLUSTERD_STATUS_STARTED == volinfo->status) {
- ret = glusterd_brick_stop (volinfo, brickinfo);
+ ret = glusterd_brick_stop (volinfo, brickinfo,
+ _gf_true);
if (ret) {
gf_log (THIS->name, GF_LOG_ERROR, "Unable to stop "
"glusterfs, ret: %d", ret);
goto out;
}
}
- glusterd_delete_brick (volinfo, brickinfo);
goto out;
}
@@ -1290,6 +1290,7 @@ glusterd_remove_brick_migrate_cbk (glusterd_volinfo_t *volinfo,
brickinfo->path);
brickinfo->decommissioned = 0;
if (GLUSTERD_STATUS_STARTED == volinfo->status) {
+ /*TODO: use the 'atomic' flavour of brick_stop*/
ret = glusterd_brick_stop (volinfo, brickinfo);
if (ret) {
gf_log (THIS->name, GF_LOG_ERROR,