summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-09-10 11:27:42 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-09-14 02:05:25 -0700
commit2e041639d8e49e2b768dd43c6f702106250e4da9 (patch)
tree6400ef316c056fb9ffd37ba55fcc3f604588de34 /xlators/mgmt/glusterd/src/glusterd-brick-ops.c
parent2ec8ea8769e943d3987dd80f8f6937359bcccf34 (diff)
tier/glusterd : Disable subvol match check during detach tier
For tiering, user does not have authorization to choose for bricks to detach, so we don't need to whether subvols match for the bricks or not. Change-Id: I7e777ccc1aa261f652f9b158718fcd55185c7794 BUG: 1261741 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12145 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index 73c40bd..612ab92 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -990,8 +990,10 @@ __glusterd_handle_remove_brick (rpcsvc_request_t *req)
strcpy (brick_list, " ");
+ /* subvol match is not required for tiered volume*/
if ((volinfo->type != GF_CLUSTER_TYPE_NONE) &&
- (volinfo->subvol_count > 1)) {
+ (volinfo->type != GF_CLUSTER_TYPE_TIER) &&
+ (volinfo->subvol_count > 1)) {
ret = subvol_matcher_init (&subvols, volinfo->subvol_count);
if (ret)
goto out;
@@ -1031,13 +1033,19 @@ __glusterd_handle_remove_brick (rpcsvc_request_t *req)
(volinfo->brick_count <= volinfo->dist_leaf_count))
continue;
- /* Find which subvolume the brick belongs to */
- subvol_matcher_update (subvols, volinfo, brickinfo);
+ /* Find which subvolume the brick belongs to.
+ * subvol match is not required for tiered volume
+ *
+ */
+ if (volinfo->type != GF_CLUSTER_TYPE_TIER)
+ subvol_matcher_update (subvols, volinfo, brickinfo);
}
/* Check if the bricks belong to the same subvolumes.*/
- if ((volinfo->type != GF_CLUSTER_TYPE_NONE) &&
- (volinfo->subvol_count > 1)) {
+ /* subvol match is not required for tiered volume*/
+ if ((volinfo->type != GF_CLUSTER_TYPE_NONE) &&
+ (volinfo->type != GF_CLUSTER_TYPE_TIER) &&
+ (volinfo->subvol_count > 1)) {
ret = subvol_matcher_verify (subvols, volinfo,
err_str, sizeof(err_str),
vol_type, replica_count);