diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-05-25 04:26:00 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 05:11:05 -0700 |
commit | 411aa2902d304495a4a374a09b767e588b330e88 (patch) | |
tree | b9c7eb2a427f61613221841a8607aa28a2698a75 /xlators/performance/stat-prefetch | |
parent | fcd35ea786dea454b11837f818be959082c8e731 (diff) |
performance/stat-prefetch: return ESTALE if inode's gfid is not the same as cached gfid for a path.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2927 (Mismatched link/target gfid and ESTALE/ENOENT)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2927
Diffstat (limited to 'xlators/performance/stat-prefetch')
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index be83dcb29d7..43c5f5e720f 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -1148,6 +1148,15 @@ sp_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) if (cache) { ret = sp_cache_get_entry (cache, (char *)loc->name, &dirent); if (ret == 0) { + if (!uuid_is_null (loc->inode->gfid) + && (uuid_compare (loc->inode->gfid, + dirent->d_stat.ia_gfid)) + != 0) { + op_ret = -1; + op_errno = ESTALE; + goto unwind; + } + ret = inode_ctx_get (loc->parent, this, &value); if ((ret == 0) && (value != 0)) { parent_inode_ctx = (void *)(long)value; |