ESTALE after cwd deleted by same NFS client

Rick Macklem rmacklem at uoguelph.ca
Wed Dec 14 17:41:48 UTC 2016


Colin Percival wrote:

>On 12/13/16 05:04, Rick Macklem wrote:
>>>>> On Sun, Dec 11, 2016 at 11:06:42PM +0000, Colin Percival wrote:
>>>>>> If I run the following with /nfs/ being an NFS mount:
>>>>>> # mkdir /nfs/foo
>>>>>> # touch /nfs/foo/bar
>>>>>> # cd /nfs/foo
>>>>>> # rm -r /nfs/foo
>>>>>> # rm bar
>> If this is happening on a single client
>
>Yes.  At the time I ran this, there was only one client.
>
>> something is broken.
>> - For this step, the name cache should have a miss and the Lookup should fail with
>>   ENOENT. I think the most likely failures are...
>>   --> Either the name cache in the client is broken and has a hit
>>   OR
>>   --> The server replies NFS_OK for the lookup, even though it should have been >removed.
>
>The server replied ESTALE for the 'rm bar'.  Is that the lookup you mean?  I
>don't think a lookup happened for /nfs/foo after the 'rm -r' completed, since
>it was already the current directory (despite no longer existing).
If there was no Lookup between "rm -r /nfs/foo" and "rm bar" then that is the
problem. The NFS client remove makes a cache call (can't remember the exact
function name without looking at the code) which should invalidate the mapping
of the name ("bar" in this case). Then, a Lookup of "bar" should occur.
--> I'll try and reproduce this when I get home on the weekend.

rick
[stuff snipped]



More information about the freebsd-fs mailing list