diff options
author | Raghavendra G <raghavendra@gluster.com> | 2012-05-14 14:23:56 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-08-03 01:13:36 -0700 |
commit | 66205114267ec659b4ad8084c7e9497009529c61 (patch) | |
tree | 1ad8e04f505cb1adfc6021acb9fb372a9c3827dd /xlators/mount/fuse/src/fuse-resolve.c | |
parent | 8a1dedca925fe99860f61b554b7c86d8c1302596 (diff) |
mount/fuse: ignore any erros that might've happened while resolving entry in resolver.
One error we hit was absence of gfid on backend. While the lookup
code-path generates a new uuid and sets it on file, resolver code
doesn't do that. Since, functionally (atleast after resolving parent
inode, we would be resolving the path in new-graph) both resolver
and lookup does same work, it would be no harm in ignoring errors
during resolving the entry. This would help us to continue with
the _extra_ work (like healing gfid as of now) in fuse_lookup_resume.
Change-Id: If46d5e07c32e67b5744287a6ef55d0b0fe347689
BUG: 821138
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/3344
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-resolve.c')
-rw-r--r-- | xlators/mount/fuse/src/fuse-resolve.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c index 9e4bef0b1..62ee456f8 100644 --- a/xlators/mount/fuse/src/fuse-resolve.c +++ b/xlators/mount/fuse/src/fuse-resolve.c @@ -98,6 +98,7 @@ fuse_resolve_entry_cbk (call_frame_t *frame, void *cookie, xlator_t *this, resolve_loc->name, buf); state->loc_now->inode = link_inode; + out: loc_wipe (resolve_loc); @@ -132,8 +133,8 @@ fuse_resolve_entry (fuse_state_t *state) int fuse_resolve_gfid_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int op_ret, int op_errno, inode_t *inode, struct iatt *buf, - dict_t *xattr, struct iatt *postparent) + int op_ret, int op_errno, inode_t *inode, + struct iatt *buf, dict_t *xattr, struct iatt *postparent) { fuse_state_t *state = NULL; fuse_resolve_t *resolve = NULL; @@ -153,7 +154,19 @@ fuse_resolve_gfid_cbk (call_frame_t *frame, void *cookie, xlator_t *this, uuid_utoa (resolve->resolve_loc.gfid), strerror (op_errno)); loc_wipe (&resolve->resolve_loc); - resolve->op_ret = -1; + + /* resolve->op_ret can have 3 values: 0, -1, -2. + * 0 : resolution was successful. + * -1: parent inode could not be resolved. + * -2: entry (inode corresponding to path) could not be resolved + */ + + if (uuid_is_null (resolve->gfid)) { + resolve->op_ret = -1; + } else { + resolve->op_ret = -2; + } + resolve->op_errno = op_errno; goto out; } |