From 36e39bf9cb4b7c712ef411d60203bf05af7e129f Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Wed, 25 Mar 2009 18:08:43 +0530 Subject: Enhancements to distribute selfheal - create missing directories instead of creating linkfiles when entry missing on hashed subvol - detect cases where there are dirs and linkfiles for a name and make them all dirs Signed-off-by: Anand V. Avati --- xlators/cluster/dht/src/dht-layout.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (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 a45625876bd..45a7df60138 100644 --- a/xlators/cluster/dht/src/dht-layout.c +++ b/xlators/cluster/dht/src/dht-layout.c @@ -514,6 +514,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol, int pos = -1; int ret = 0; int err = 0; + int dict_ret = 0; int32_t *disk_layout = NULL; int32_t count = -1; uint32_t start_off = -1; @@ -547,10 +548,10 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol, goto out; } - ret = dict_get_ptr (xattr, "trusted.glusterfs.dht", - VOID(&disk_layout)); + dict_ret = dict_get_ptr (xattr, "trusted.glusterfs.dht", + VOID(&disk_layout)); - if (ret < 0) { + if (dict_ret < 0) { if (err == 0) { gf_log (this->name, GF_LOG_ERROR, "%s - disk layout missing", loc->path); -- cgit