From 8896ffd86b1856de17d65874f89a76ad84b6258b Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Thu, 17 Jul 2014 14:17:17 +0530 Subject: glusterd: Correctly reset volinfo->caps during volume create Change-Id: I012899be08a06d39ea5c9fb98a66acf833d7213f BUG: 1120589 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/8323 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 26 ++++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index f23a9eb96b7..334aef9f412 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -1819,23 +1819,21 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr) } #ifdef HAVE_BD_XLATOR - if (!uuid_compare (brickinfo->uuid, MY_UUID)) { - if (brickinfo->vg[0]) { - ret = glusterd_is_valid_vg (brickinfo, 0, msg); - if (ret) { - gf_log (this->name, GF_LOG_ERROR, "%s", - msg); - goto out; - } - - /* if anyone of the brick does not have thin - support, disable it for entire volume */ - caps &= brickinfo->caps; - + if (!uuid_compare (brickinfo->uuid, MY_UUID) + && brickinfo->vg[0]) { + ret = glusterd_is_valid_vg (brickinfo, 0, msg); + if (ret) { + gf_log (this->name, GF_LOG_ERROR, "%s", msg); + goto out; + } - } else + /* if anyone of the brick does not have thin + support, disable it for entire volume */ + caps &= brickinfo->caps; + } else { caps = 0; } + #endif list_add_tail (&brickinfo->brick_list, &volinfo->bricks); -- cgit