summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.c')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 1b19a58d1..c5d05c4ae 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -543,7 +543,18 @@ sp_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
op_errno = 0;
lookup_behind = 1;
}
- }
+ } else if (S_ISDIR (loc->inode->st_mode)) {
+ cache = sp_get_cache_inode (this, loc->inode, frame->root->pid);
+ if (cache) {
+ ret = sp_cache_get_entry (cache, ".", &dirent);
+ if (ret == 0) {
+ buf = &dirent.d_stat;
+ op_ret = 0;
+ op_errno = 0;
+ lookup_behind = 1;
+ }
+ }
+ }
wind:
if (lookup_behind) {