Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Dec 2016 04:00:39 +0000
From:      Colin Percival <cperciva@tarsnap.com>
To:        Don Lewis <truckman@FreeBSD.org>, rmacklem@uoguelph.ca
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ESTALE after cwd deleted by same NFS client
Message-ID:  <010001591f89c531-9df17b6f-0a7d-421b-89eb-c3bfa8da6b9a-000000@email.amazonses.com>
In-Reply-To: <201612210325.uBL3PVtg006345@gw.catspoiler.org>
References:  <201612210325.uBL3PVtg006345@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?010001591f89c531-9df17b6f-0a7d-421b-89eb-c3bfa8da6b9a-000000>