summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-inode-read.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-inode-read.c')
-rw-r--r--xlators/cluster/dht/src/dht-inode-read.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-inode-read.c b/xlators/cluster/dht/src/dht-inode-read.c
index fc8c5461a54..6046f14baaa 100644
--- a/xlators/cluster/dht/src/dht-inode-read.c
+++ b/xlators/cluster/dht/src/dht-inode-read.c
@@ -510,9 +510,9 @@ dht_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto out;
if (local->call_cnt != 1)
goto out;
- if ((op_ret == -1) && (op_errno == ENOTCONN) &&
+ if ((op_ret == -1) && ((op_errno == ENOTCONN) ||
+ (op_errno == ENOENT)) &&
IA_ISDIR(local->loc.inode->ia_type)) {
-
subvol = dht_subvol_next_available (this, prev->this);
if (!subvol)
goto out;
@@ -526,7 +526,9 @@ dht_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&local->loc, local->rebalance.flags, NULL);
return 0;
}
- if ((op_ret == -1) && (op_errno == ENOENT)) {
+
+ if ((op_ret == -1) && (op_errno == ENOENT) &&
+ !(IA_ISDIR(local->loc.inode->ia_type))) {
/* File would be migrated to other node */
local->op_errno = op_errno;
local->rebalance.target_op_fn = dht_access2;