From dd1f4a480511c4785d004c06dd9c41ba54f05143 Mon Sep 17 00:00:00 2001 From: Vijaykumar M Date: Mon, 30 Dec 2013 18:06:56 +0530 Subject: dht: Ignore directory with missing xattrs, which have err == 0, and start == stop From the history (Patch: http://review.gluster.org/4668/) When subvols-per-directory is < available subvols, then there are layouts which are not populated. This leads to incorrect identification of holes or overlaps. We need to ignore layouts, which have err == 0, and start == stop. In the current scenario (start == stop == 0). Additionally, in layout-merge, treat missing xattrs as err = 0. In case of missing layouts, anomalies will reset them. For any other valid subvoles, err != 0 in case of layouts being zeroed out. Also reverted back dht_selfheal_dir_xattr, which does layout calculation only on subvols which have errors. Change-Id: Idb72a869f1a6f103046bb7e6fe0019f6ac853fd4 BUG: 1047331 Signed-off-by: Vijaykumar M Reviewed-on: http://review.gluster.org/6618 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Shyamsundar Ranganathan Reviewed-by: Anand Avati --- xlators/cluster/dht/src/dht-layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-layout.c') diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c index 2bd9e5ff6..f7413c8a0 100644 --- a/xlators/cluster/dht/src/dht-layout.c +++ b/xlators/cluster/dht/src/dht-layout.c @@ -722,7 +722,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol, &disk_layout_raw); if (dict_ret < 0) { - if (err == 0) { + if (err == 0 && layout->list[pos].stop) { gf_log (this->name, GF_LOG_INFO, "%s - disk layout missing", loc->path); ret = -1; -- cgit