Bug 577378
Summary: | NFSv3 file attributes are not updated by READDIRPLUS reply | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Fabio Olive Leite <fleite> | ||||||
Component: | kernel | Assignee: | Jeff Layton <jlayton> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Petr Beňas <pbenas> | ||||||
Severity: | urgent | Docs Contact: | |||||||
Priority: | urgent | ||||||||
Version: | 4.8 | CC: | dhoward, jlayton, jwest, pbenas, pstehlik, rbinkhor, rwheeler, steved, tao | ||||||
Target Milestone: | rc | Keywords: | ZStream | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-02-16 15:43:16 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 596372 | ||||||||
Attachments: |
|
Description
Fabio Olive Leite
2010-03-26 19:58:39 UTC
Created attachment 402932 [details]
getdents program to verify the bug and the fix
This was taken from the getdents() manpage.
One aspect of this that just came to my mind, though, is that this issue contains two "root causes": 1. getdents() or readdir() return d_type information based on cached file attributes without causing a refresh of those attributes; 2. the kernel was not using the fresh data from the READDIRPLUS replies. We fixed the second problem, but if we stop to think, the first one is still there. I just mounted an NFS volume in both my patched RHEL-4 system and also on my Fedora 12 netbook with the "nordirplus" option, to disable the usage of READDIRPLUS. This immediately causes the issue to always reproduce. Surely it is obvious, but it is a problematic use case we should consider. When we do a readdir() on a directory, we check if the mtime has changed, and if it has we get a listing of directory entries. It appears that the code implies that if a certain directory entry still has the same name, it will map to the same object, which is not correct. Perhaps we should also ensure to return d_type of DT_UNKNOWN for each existing cached positive dentry if the directory attributes were updated after the file attributes of that dentry, since we cannot be sure if that dentry's attributes can be trusted. I do not really know what to make of it. I believe it's been this way since "forever". Fábio Olivé I've put Fabio's patch into my test kernels.(well, actually my own backport of the two upstream patches, that matches Fabio's backport): http://people.redhat.com/jlayton/ It would be helpful if you could confirm that they fix the problem. The other issue that still seems to be an upsteam problem should probably be cloned to a separate bug if you're interested in pursuing it. This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. Committed in 89.26.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/ Reproduced in 89.25.EL and verified in 89.26.EL. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0263.html |