summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-03-26 18:44:14 +0530
committerAnand Avati <avati@redhat.com>2012-08-03 00:33:48 -0700
commit6731020700b949e1e7351d8e5d390f329bf4fba2 (patch)
tree2dd02c512ef8b36ae695d31f6333e4393392fac6 /xlators/mount/fuse/src
parent2e1d2c96f544772ed4f1c8eb66c1d5e9f4a01484 (diff)
fuse-resolve: consider cases where an entry should be resolved even when parent belongs to active itable.
When parent is root, the parent inode returned will always be active_subvol->itable->root and hence there can be cases where we should explicitly resolve the entry in active graph. BUG: 804592 Change-Id: I5829278e27435e06785a923ce8776616cedfb519 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3710 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src')
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c
index bd27af4d25c..9e4bef0b138 100644
--- a/xlators/mount/fuse/src/fuse-resolve.c
+++ b/xlators/mount/fuse/src/fuse-resolve.c
@@ -239,6 +239,19 @@ fuse_resolve_parent_simple (fuse_state_t *state)
/* no graph switches since */
loc->parent = inode_ref (parent);
loc->inode = inode_grep (state->itable, parent, loc->name);
+
+ /* nodeid for root is 1 and we blindly take the latest graph's
+ * table->root as the parhint and because of this there is
+ * ambiguity whether the entry should have existed or not, and
+ * we took the conservative approach of assuming entry should
+ * have been there even though it need not have (bug #804592).
+ */
+ if ((loc->inode == NULL)
+ && __is_root_gfid (parent->gfid)) {
+ /* non decisive result - entry missing */
+ return -1;
+ }
+
/* decisive result - resolution success */
return 0;
}