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.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/cluster/dht/src/dht.c') diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index d7b1e9655e7..d70d713ac71 100644 --- a/xlators/cluster/dht/src/dht.c +++ b/xlators/cluster/dht/src/dht.c @@ -262,6 +262,7 @@ dht_parse_decommissioned_bricks (xlator_t *this, dht_conf_t *conf, if (!strcmp (conf->subvolumes[i]->name, node)) { conf->decommissioned_bricks[i] = conf->subvolumes[i]; + conf->decommission_subvols_cnt++; gf_log (this->name, GF_LOG_INFO, "decommissioning subvolume %s", conf->subvolumes[i]->name); -- cgit