Red Hat Bugzilla – Bug 401551
NFS dentries can contain stale file IDs
Last modified: 2008-04-10 12:57:53 EDT
In RHEL-4u6 it is possible to have nfs_readdir_lookup return dentries
containing stale NFS file IDs, thus causing stat/open calls to fail.
This is related to upstream commit ef75c7974b383769ae5741cf930b8aa4dcaef395.
I'll attach a patch that applies cleanly to 2.6.9-67.EL and fixes the problem
(tested at customer site). It has some debug printks that can be safely
Created attachment 270011 [details]
Patch that adds extra validity checks to nfs_readdir_lookup.
Patch looks reasonable and is upstream. Do we have a way to reliably reproduce
this? As a side note, this might be the bug behind bug 327591. We have no way to
reproduce that as of yet though, so it's hard to know for sure.
I've gone ahead and added this patch to my test kernels. When you get a
reproducer, it would be good to verify that this patch actually fixes it.
Test kernels are at:
I've tested this reproducer on a kernel without this patch and then on one with
it. I don't see any difference in behavior. I still see an ENOENT error ~1/3 to
1/2 of the time.
IIRC, when I looked at this problem before, we concluded that the issue was
timestamp granularity on the server. I don't think it's possible to fix that,
aside from moving to a different server-side filesystem.
Can you clarify the configuration of your client and server? What kernel is
running on the client, and what sort of local filesystem is the server using?
Do we have any indication if RHEL 5 is vulnerable to this?
I would guess that RHEL-5 is vulnerable.
I suspect that this problem is really a duplicate of 231143. The problem
isn't that the client can cache metadata which becomes stale, the problem
is that the client doesn't properly recover when it detects the stale