summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2014-07-17 14:17:17 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-07-17 05:21:00 -0700
commit8896ffd86b1856de17d65874f89a76ad84b6258b (patch)
treef34078290cd791b6f0e9dcf8ec066d332b52c087 /xlators/mgmt/glusterd/src/glusterd-volume-ops.c
parente291ce0531f3be429f90fc3ba84fa33a2e17b0f6 (diff)
glusterd: Correctly reset volinfo->caps during volume create
Change-Id: I012899be08a06d39ea5c9fb98a66acf833d7213f BUG: 1120589 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/8323 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c26
1 files 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);