From 448b59e60b0ea5e085769283e89893176b86659f Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Fri, 7 Dec 2012 10:00:15 +0530 Subject: cluster/distribute: re-set layouts to prevent overlaps When subvols-per-directory option is used, with bricks addition/removal the layouts might get distributed to other subvols, which were not part of the layout before. We need to clean up layouts on old subvolumes, to prevent overlaps. Also, we need to make sure if layout-cnt is never less than subvolume-cnt. Change-Id: I00994a092ca0c99aedcc41bd9412d43460f88a04 BUG: 884455 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.org/4281 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/dht/src/dht-common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/cluster/dht/src/dht-common.h') diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 1f3ccc1cde0..83ec345d645 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -263,6 +263,7 @@ struct dht_conf { /* to keep track of nodes which are decomissioned */ xlator_t **decommissioned_bricks; int decommission_in_progress; + int decommission_subvols_cnt; /* defrag related */ gf_defrag_info_t *defrag; @@ -721,4 +722,6 @@ int dht_dir_attr_heal_done (int ret, call_frame_t *sync_frame, void *data); int dht_dir_has_layout (dict_t *xattr); +gf_boolean_t +dht_is_subvol_in_layout (dht_layout_t *layout, xlator_t *xlator); #endif/* _DHT_H */ -- cgit