summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-08-12 14:56:27 +0530
committerDan Lambright <dlambrig@redhat.com>2015-11-17 10:23:03 -0800
commit2354a37605655ebe9d647ab568cbcd47832688f6 (patch)
tree2ed6ba9ad89f7675d26147547a7a6ef582a40614 /xlators/performance
parent60a4288f0a2444821e17ac6eaeb402b466dd4a1a (diff)
md-cache: Remove readdirp fop for md-cache
readdirp call will return inode for each entry and will share this nodeid with kernal, also md-cache will cache this gfid and base name. So when a lookup operation is perfromed on such an inode, md-cache will wind the call, that prevents populating inode ctx for other lower layer xlators. >Change-Id: I43c768703a3cc66d05b1c32909d1a2781001cb49 >BUG: 1236032 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/11894 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit c8c9308134ae4ce24c630a1b0ccfcf4e8f9b0fe7) Change-Id: Iaa5451f5ff25fb16119a6c3322b1787709d1aba4 BUG: 1266880 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12554 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/md-cache/src/md-cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index c3b4dfe636f..d07e768628d 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -1977,7 +1977,8 @@ int
mdc_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, gf_dirent_t *entries, dict_t *xdata)
{
- gf_dirent_t *entry = NULL;
+ gf_dirent_t *entry = NULL;
+ struct md_cache *mdc = NULL;
if (op_ret <= 0)
goto unwind;
@@ -1985,6 +1986,8 @@ mdc_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
list_for_each_entry (entry, &entries->list, list) {
if (!entry->inode)
continue;
+ if (mdc_inode_ctx_get (this, entry->inode, &mdc) != 0)
+ continue;
mdc_inode_iatt_set (this, entry->inode, &entry->d_stat);
mdc_inode_xatt_set (this, entry->inode, entry->dict);
}