Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2016 13:09:02 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Colin Percival <cperciva@tarsnap.com>, Benjamin Kaduk <kaduk@mit.edu>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: ESTALE after cwd deleted by same NFS client
Message-ID:  <YTXPR01MB0189ACD940B7D399A6855CB8DD9A0@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <01000158fc3da2c5-c13da088-e7b9-4ac0-ac01-ec49a275dd24-000000@email.amazonses.com>
References:  <01000158f023675b-41b35a73-4428-4937-853b-62db4fb9b984-000000@email.amazonses.com> <20161212054233.GU8460@kduck.kaduk.org> <01000158f1abc081-d4eddc58-3b4b-41dd-aa1e-0157d2fad812-000000@email.amazonses.com> <20161212163603.GV8460@kduck.kaduk.org> <YQBPR01MB018054EE62DEFDC73784AD9BDD9B0@YQBPR01MB0180.CANPRD01.PROD.OUTLOOK.COM>, <01000158fc3da2c5-c13da088-e7b9-4ac0-ac01-ec49a275dd24-000000@email.amazonses.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 ha=
ve 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, si=
nce
>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 t=
he
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 mapp=
ing
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]




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTXPR01MB0189ACD940B7D399A6855CB8DD9A0>