From 2e041639d8e49e2b768dd43c6f702106250e4da9 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Thu, 10 Sep 2015 11:27:42 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/12145 Reviewed-by: Dan Lambright Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 73c40bd082c..612ab921d64 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); -- cgit