|
|
d1681e |
From d4a387d3e419f4b15a5fc98a9ee7af4644b05ffe Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Poornima G <pgurusid@redhat.com>
|
|
|
d1681e |
Date: Wed, 16 May 2018 11:00:32 +0530
|
|
|
d1681e |
Subject: [PATCH 272/274] readdir-ahead: Fix an issue with parallel-readdir and
|
|
|
d1681e |
readdir-optimize
|
|
|
d1681e |
|
|
|
d1681e |
Issue: When parallel-readdir is enabled, readdir-optimize automatically
|
|
|
d1681e |
stops working because of a bug in rda_opendir.
|
|
|
d1681e |
|
|
|
d1681e |
RCA: In rda_opendir, the xattrs that indicate readdir-optimize or not
|
|
|
d1681e |
is sent in xdata. This xdata is sent to all the readdirp prefetch
|
|
|
d1681e |
calls. A dict_ref is taken on xdata and kept in rda_opendir to be
|
|
|
d1681e |
used by rda_fill_fd, but dht_opendir deletes some elements in xdata
|
|
|
d1681e |
after calling rda_opendir. Hence dict_ref is not a right choice here,
|
|
|
d1681e |
dict_copy needs to used.
|
|
|
d1681e |
|
|
|
d1681e |
Backport of https://review.gluster.org/#/c/20026/
|
|
|
d1681e |
|
|
|
d1681e |
>Change-Id: Ie7cc7ceb03117dd4179ef7905647f2f123f94966
|
|
|
d1681e |
>fixes: bz#1578650
|
|
|
d1681e |
>Signed-off-by: Poornima G <pgurusid@redhat.com>
|
|
|
d1681e |
|
|
|
d1681e |
Bug: 1578647
|
|
|
d1681e |
Change-Id: Ia710b39ad2fe9e71df17ae13c3281526f382004b
|
|
|
d1681e |
Signed-off-by: Poornima G <pgurusid@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/139040
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/performance/readdir-ahead/src/readdir-ahead.c | 2 +-
|
|
|
d1681e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
d1681e |
index 0d3bdbd..6501a6b 100644
|
|
|
d1681e |
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
d1681e |
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
d1681e |
@@ -525,7 +525,7 @@ rda_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
|
|
|
d1681e |
* Retrieve list of keys set by md-cache xlator and store it
|
|
|
d1681e |
* in local to be consumed in rda_opendir_cbk
|
|
|
d1681e |
*/
|
|
|
d1681e |
- local->xattrs = dict_ref (xdata);
|
|
|
d1681e |
+ local->xattrs = dict_copy_with_ref (xdata, NULL);
|
|
|
d1681e |
frame->local = local;
|
|
|
d1681e |
}
|
|
|
d1681e |
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|