summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-11-13 12:55:06 +0530
committerAmar Tumballi <amarts@redhat.com>2017-12-15 05:10:01 +0000
commit62ca4aec69b206723f809ce79bb501fa7bf46249 (patch)
treeb3c37ab797ed147859a8553db7d20f5ec6aba20a /xlators/cluster/dht/src
parent415e0bcc80b350fc75f325b490560f44ba419b20 (diff)
dht: Fill first_up_subvol before use in dht_opendir
Reported by: Sam McLeod Change-Id: Ic8f9b46b173796afd70aff1042834b03ac3e80b2 BUG: 1512437 Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 9d0e30ae461..2bee8bb1e65 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -6201,6 +6201,7 @@ dht_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
op_errno = ENOMEM;
goto err;
}
+ local->first_up_subvol = dht_first_up_subvol (this);
if (!xdata) {
xdata = dict_new ();
@@ -6228,6 +6229,10 @@ dht_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
subvolumes = conf->local_subvols;
}
+ /* In case of parallel-readdir, the readdir-ahead will be loaded
+ * below dht, in this case, if we want to enable or disable SKIP_DIRs
+ * it has to be done in opendir, so that prefetching logic in
+ * readdir-ahead, honors it */
for (i = 0; i < call_count; i++) {
if (conf->readdir_optimize == _gf_true) {
if (subvolumes[i] != local->first_up_subvol) {