diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-06-22 02:55:59 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-22 08:42:23 -0700 |
commit | 1faa643bd0c1b99bf8a250cf108681e1e53846c5 (patch) | |
tree | 7acf14a43df2a2f6d215863a141f98b3fd9cf3ed | |
parent | fa7c54f8e89abdee8984439974eb12bbf51a0e5b (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
-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 d34a747f4bb..6eea75b64d6 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); |