Blob Blame History Raw
From b72fd52167fe168b39671e845ebdbccfa8054078 Mon Sep 17 00:00:00 2001
From: Poornima G <pgurusid@redhat.com>
Date: Fri, 8 Jul 2016 14:25:35 +0530
Subject: [PATCH 115/141] md-cache: Enable caching of stat fetched from readdirp

Patch http://review.gluster.org/11894 removed readdirp fop for
md-cache, but there is no mention of exact xlator which was
failing because of this. As mentioned by Rafi(author of patch 11894)
tiering and svc doesn't really need this as the inode_ctx is populated
in readdirp_cbk. Hence reverting this commit.
This reverts commit c8c9308134ae4ce24c630a1b0ccfcf4e8f9b0fe7.

Change-Id: Ib8d00b3f129596f3a54984f839199175f5c9b55b
BUG: 1284873
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/14879
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/87028
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Rajesh Joseph <rjoseph@redhat.com>
---
 xlators/performance/md-cache/src/md-cache.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index c1aef21..1ad9e8e 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -2068,8 +2068,7 @@ 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;
-        struct md_cache *mdc        = NULL;
+        gf_dirent_t *entry      = NULL;
 
 	if (op_ret <= 0)
 		goto unwind;
@@ -2077,8 +2076,6 @@ 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);
         }
-- 
1.7.1