Bug 1380419 - gNFS: Revalidate lookup of a file in case of gfid mismatch
Summary: gNFS: Revalidate lookup of a file in case of gfid mismatch
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gluster-nfs
Version: rhgs-3.2
Hardware: All
OS: All
Target Milestone: ---
: RHGS 3.2.0
Assignee: Mohammed Rafi KC
QA Contact: surabhi
Depends On:
Blocks: 1351528 1358096
TreeView+ depends on / blocked
Reported: 2016-09-29 14:36 UTC by Soumya Koduri
Modified: 2017-03-23 06:06 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.8.4-6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-03-23 06:06:14 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0486 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.2.0 security, bug fix, and enhancement update 2017-03-23 09:18:45 UTC

Description Soumya Koduri 2016-09-29 14:36:25 UTC
Description of problem:

As mentioned in the https://bugzilla.redhat.com/show_bug.cgi?id=1358096#c55 ,


In case of any lookup sent on a file, if the file already exists but with a different gfid, clients should revalidate/re-issue the lookup to correct the gfid.

nfs_lookup() fop starts with setting lookuptype to GF_NFS3_REVALIDATE. But as per the code changes done in the patch mentioned in the comment#52, before doing STACK_WIND on the child xlator lookup, in case if we find cached inode for that file/entry name in the inode table but with inode_ctx not set, we reset lookuptype to GF_NFS3_FRESH. This may have led to nfs xlator not sending fresh lookup on receiving ESTALE.

This bug is to track the fix for the above mentioned issue.

Version-Release number of selected component (if applicable):

How reproducible:
From code-inspection

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 2 Soumya Koduri 2016-10-13 13:45:23 UTC
Patch posted upstream for review -

Comment 6 Mohammed Rafi KC 2016-11-16 05:56:19 UTC
upstream master patch : http://review.gluster.org/15580
upstream 3.9 patch : http://review.gluster.org/#/c/15839/
upstream 3.8 patch : http://review.gluster.org/#/c/15840/
downstream patch : https://code.engineering.redhat.com/gerrit/90281

Comment 7 Atin Mukherjee 2016-11-16 09:00:14 UTC
Please note upstream 3.9 & 3.8 patches are yet to be merged as for both of them the merge windows are not yet open.

Comment 10 surabhi 2017-02-07 06:40:59 UTC
Tried following test as per discussion with Soumya:

Mount with nfs on two clients

c1 : create dir/f1
Restart gnfs on server
ls dir

From c2:
rm dir/f1
touch dir/f1

From c1
ls dir/f1

There are no issues seen while listing the file which is recreated with the same name after removal from another client.

Marking the BZ verified.

Comment 12 errata-xmlrpc 2017-03-23 06:06:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.