summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-05-09 21:06:07 +0530
committerRaghavendra Talur <rtalur@redhat.com>2016-05-12 22:52:40 -0700
commitdf12ab0937ce44d0190d7eb8f272170bf9515390 (patch)
tree79f7960c15628ac0debe3811a52d666de6866376
parent54b991b587317a8be06faded01eed4ee046f3bb8 (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 <rtalur@redhat.com> >Reviewed-on: http://review.gluster.org/14274 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Niels de Vos <ndevos@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> >(cherry picked from commit b2f09e531029f573772a09572cee0f8e1855481b) Change-Id: Ib192ada0528b5fb5e49b4e2555f2bcab62710e2d BUG: 1334443 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/14289 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--api/src/glfs-resolve.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 7a7064c3aa2..7bfd554fe8e 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -318,6 +318,7 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent,
inode_unlink(loc.inode, loc.parent,
loc.name);
inode_unref (loc.inode);
+ gf_uuid_clear (loc.gfid);
loc.inode = inode_new (parent->table);
if (!loc.inode) {
errno = ENOMEM;