summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-common.c4
-rw-r--r--xlators/cluster/dht/src/tier.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index c26100c84fa..6c0afdbec90 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -715,7 +715,8 @@ dht_revalidate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unlock;
}
- if (stbuf->ia_type != local->inode->ia_type) {
+ if ((!IA_ISINVAL(local->inode->ia_type)) &&
+ stbuf->ia_type != local->inode->ia_type) {
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_FILE_TYPE_MISMATCH,
"mismatching filetypes 0%o v/s 0%o for %s,"
@@ -727,6 +728,7 @@ dht_revalidate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->op_errno = EINVAL;
goto unlock;
+
}
layout = local->layout;
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 593a2cc29ed..866405105a8 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -973,6 +973,9 @@ tier_search (xlator_t *this, dht_layout_t *layout, const char *name)
search_first_subvol = 1;
}
+ if ((layout->list[0].err > 0) && (layout->list[0].err != ENOTCONN))
+ search_first_subvol = 0;
+
if (search_first_subvol)
subvol = layout->list[0].xlator;
else