path: root/api
diff options
authorRaghavendra Talur <>2016-05-09 21:06:07 +0530
committerRaghavendra Talur <>2016-05-12 22:52:46 -0700
commitff7f6fc82cfe3a6af4bf3f339c31843a0e9c9b28 (patch)
tree1f072ed6d65dcaa4b60f067879c52aa634d102c1 /api
parent1d6852f2f892792b4bb54c24be2681f57f77d7fc (diff)
gfapi: clear loc.gfid when retrying after ESTALE
If an ESTALE is returned as result of a revalidate lookup, it means the previous gfid and inode are to be discarded and lookup has to be tried as a fresh one. A fresh lookup should not have loc.gfid set. We were creating a new inode and passing it down but not clearing loc.gfid. This patch fixes that. >Change-Id: Ib192ada0528b5fb5e49b4e2555f2bcab62710e2d >BUG: 1334444 >Signed-off-by: Raghavendra Talur <> >Reviewed-on: >Smoke: Gluster Build System <> >NetBSD-regression: NetBSD Build System <> >Reviewed-by: Niels de Vos <> >CentOS-regression: Gluster Build System <> >Reviewed-by: Pranith Kumar Karampuri <> >(cherry picked from commit b2f09e531029f573772a09572cee0f8e1855481b) Change-Id: Ib192ada0528b5fb5e49b4e2555f2bcab62710e2d BUG: 1334441 Signed-off-by: Raghavendra Talur <> Reviewed-on: Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <> Reviewed-by: Rajesh Joseph <>
Diffstat (limited to 'api')
1 files changed, 1 insertions, 0 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index c2c6e64..4c44b4f 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -323,6 +323,7 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent,
inode_unlink(loc.inode, loc.parent,;
inode_unref (loc.inode);
+ gf_uuid_clear (loc.gfid);
loc.inode = inode_new (parent->table);
if (!loc.inode) {
errno = ENOMEM;