diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-06-22 02:51:50 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-22 08:40:53 -0700 |
commit | 9123fd82ab1946ed6f2c3d025043da1183d84d31 (patch) | |
tree | f0d590513683ab2e857ee7f0ea4c464858ba6fa3 /xlators/mount/fuse/src/fuse-bridge.c | |
parent | 305b40239fda0b01537f05f94c3184e9523594c4 (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/fuse/src/fuse-bridge.c')
-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 a4ab749a3f2..6ab955dcd6e 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); |