diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-06-21 04:36:24 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-22 08:41:26 -0700 |
commit | d339dc07aee155e65e0ab7c36a8c658a9e1db178 (patch) | |
tree | 7d9997489f8e7585dab4efa66ee88e9ea835d160 /xlators/mount | |
parent | 1b314d49744e3a7a371717a2c2f4658983160341 (diff) |
fuse: consider a lookup as revalidate even if the inode is present in new graph.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041
Diffstat (limited to 'xlators/mount')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index b3141621bb6..ad2a706ee52 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -241,8 +241,19 @@ fuse_lookup_resume (fuse_state_t *state) free_fuse_state (state); return; } - if (!state->loc.inode) + + if (state->loc.inode) { + gf_log ("glusterfs-fuse", GF_LOG_TRACE, + "%"PRIu64": LOOKUP %s(%"PRId64")", state->finh->unique, + state->loc.path, state->loc.inode->ino); + state->is_revalidate = 1; + } else { + gf_log ("glusterfs-fuse", GF_LOG_TRACE, + "%"PRIu64": LOOKUP %s", state->finh->unique, + state->loc.path); + uuid_generate (state->gfid); state->loc.inode = inode_new (state->loc.parent->table); + } FUSE_FOP (state, fuse_lookup_cbk, GF_FOP_LOOKUP, lookup, &state->loc, state->dict); @@ -268,16 +279,7 @@ fuse_lookup (xlator_t *this, fuse_in_header_t *finh, void *msg) } if (state->loc.inode) { - gf_log ("glusterfs-fuse", GF_LOG_TRACE, - "%"PRIu64": LOOKUP %s(%"PRId64")", finh->unique, - state->loc.path, state->loc.inode->ino); - state->is_revalidate = 1; uuid_copy (state->resolve.gfid, state->loc.inode->gfid); - } else { - gf_log ("glusterfs-fuse", GF_LOG_TRACE, - "%"PRIu64": LOOKUP %s", finh->unique, - state->loc.path); - uuid_generate (state->gfid); } uuid_copy (state->resolve.pargfid, state->loc.parent->gfid); |