From d339dc07aee155e65e0ab7c36a8c658a9e1db178 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Tue, 21 Jun 2011 04:36:24 +0000 Subject: fuse: consider a lookup as revalidate even if the inode is present in new graph. Signed-off-by: Raghavendra G Signed-off-by: Anand Avati BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041 --- xlators/mount/fuse/src/fuse-bridge.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'xlators') 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); -- cgit