ESTALE after cwd deleted by same NFS client

Rick Macklem rmacklem at uoguelph.ca
Thu Dec 22 01:16:17 UTC 2016


Colin Percival wrote:

>On 12/20/16 19:25, Don Lewis wrote:
>>>> Colin Percival wrote:
>>>>> In UFS there are checks for effnlink == 0 which result in e.g. ufs_lookup
>>>>> returning ENOENT; would it make sense to add NREMOVED to struct nfsnode.n_flag
>>>>> and check this in the appropriate nfs_* calls?
>>
>> It sort of seems like this should be handled at the vfs level.  Once
>> rmdir() succeeds, there should be no calls to the underlying fs code.
>> Maybe add a deleted flag to the vnode ...
>
>Or perhaps to the nfsnode, as I suggested a few emails ago?
>
>> Dunno how ufs and zfs handle this, but the right thing happens:
>
>I haven't looked at ZFS, but in UFS there are checks for effnlink == 0 which
>result in calls returning ENOENT.
As I already mentioned to Colin, there is also the case where another client did the
"rmdir" and the ESTALE will happen for that case, so mapping ESTALE->ENOENT
seems to me to be a simple (and maybe more general) solution for NFS.

rick



More information about the freebsd-fs mailing list