From 0ca5e92cffa5575984e87485ee4128eb8a72a02a Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Mon, 5 Oct 2015 21:36:14 +0530 Subject: fuse: resolve complete path after a graph switch If a graph switch has happended as part of a attach-tier, then there is a chance to hash fops to newly added brick before fix-layout. This causes on going i/o to fail. This patch will resolve a path, for graph switch by sending recursive lookup to the parent directories. Those lookups will help to heal the directory. backport of> >Change-Id: Ia2bb4b43a21e5cc6875ba1205628744c3f0ce4e5 >BUG: 1263549 >Signed-off-by: Mohammed Rafi KC >Reviewed-on: http://review.gluster.org/12184 >Tested-by: NetBSD Build System >Tested-by: Dan Lambright >Reviewed-by: Dan Lambright (cherry picked from commit d0edb6d555d687f76837515207b9408be0bdd55e) Change-Id: Ie92cecd5e77178d227ef21242cd0e1af0fe9ee72 BUG: 1259081 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/12319 Tested-by: NetBSD Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/storage/posix/src/posix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index de5f3a8b423..32eb18471e8 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -3814,14 +3814,14 @@ posix_get_ancestry (xlator_t *this, inode_t *leaf_inode, priv = this->private; - if (!priv->update_pgfid_nlinks) - goto out; - if (IA_ISDIR (leaf_inode->ia_type)) { ret = posix_get_ancestry_directory (this, leaf_inode, head, path, type, op_errno, xdata); } else { + + if (!priv->update_pgfid_nlinks) + goto out; ret = posix_get_ancestry_non_directory (this, leaf_inode, head, path, type, op_errno, xdata); -- cgit