summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r--xlators/cluster/dht/src/dht-common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 0db8379cf41..999a43ed9dc 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -2350,6 +2350,12 @@ dht_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
if (ENTRY_MISSING (op_ret, op_errno)) {
+
+ if (1 == conf->subvolume_cnt) {
+ /* No need to lookup again */
+ goto out;
+ }
+
gf_msg_debug (this->name, 0,
"Entry %s missing on subvol %s",
loc->path, prev->name);
@@ -2596,6 +2602,9 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
hashed_subvol = dht_subvol_get_hashed (this, loc);
local->hashed_subvol = hashed_subvol;
+
+ /* The entry has been looked up before and has an inode_ctx set
+ */
if (is_revalidate (loc)) {
layout = local->layout;
if (!layout) {
@@ -2636,6 +2645,7 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
"path %s", conf->xattr_name, loc->path);
goto err;
}
+
/* need it in case file is not found on cached file
* on revalidate path and we may encounter linkto files on
* with dht_lookup_everywhere*/