From 6731020700b949e1e7351d8e5d390f329bf4fba2 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Mon, 26 Mar 2012 18:44:14 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/3710 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mount/fuse/src/fuse-resolve.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'xlators/mount/fuse/src/fuse-resolve.c') 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; } -- cgit