summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2018-05-16 11:00:32 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-05-17 06:47:52 +0000
commit7022bcf7691eca5d890629cb4322e37f6e4e5434 (patch)
tree8f8cccb2a0c4252de3591a96df03d3b45a1bba35
parent7ac79fb033824605dd5145975a16aeb155172185 (diff)
readdir-ahead: Fix an issue with parallel-readdir and readdir-optimize
Issue: When parallel-readdir is enabled, readdir-optimize automatically stops working because of a bug in rda_opendir. RCA: In rda_opendir, the xattrs that indicate readdir-optimize or not is sent in xdata. This xdata is sent to all the readdirp prefetch calls. A dict_ref is taken on xdata and kept in rda_opendir to be used by rda_fill_fd, but dht_opendir deletes some elements in xdata after calling rda_opendir. Hence dict_ref is not a right choice here, dict_copy needs to used. Change-Id: Ie7cc7ceb03117dd4179ef7905647f2f123f94966 fixes: bz#1578650 Signed-off-by: Poornima G <pgurusid@redhat.com>
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index 8e1c0de1c44..cb2e73f9d4d 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -526,7 +526,7 @@ rda_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
* Retrieve list of keys set by md-cache xlator and store it
* in local to be consumed in rda_opendir_cbk
*/
- local->xattrs = dict_ref (xdata);
+ local->xattrs = dict_copy_with_ref (xdata, NULL);
frame->local = local;
}