ESTALE after cwd deleted by same NFS client
Colin Percival
cperciva at tarsnap.com
Sun Dec 11 23:06:50 UTC 2016
Hi filesystem gurus,
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
Then the final 'rm bar' fails with 'Stale NFS file handle'. This results
in 'make buildworld' with an NFS-backed /usr/obj failing during cleandir
(which, for some reason, seems to delete the same directories multiple
times.)
I'm not sure if this is an NFS issue or a VFS issue, nor whether this is
intended (but IMHO astonishing) behaviour or a bug.
I realize that if the 'rm -r' was performed by a different NFS client, this
is the behaviour which would be expected; but it seems to me that when the
commands are executed by the same NFS client, it should be possible for the
cached file handle for /nfs/foo to be invalidated when /nfs/foo is deleted,
in order to return ENOENT instead of ESTALE here.
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
More information about the freebsd-fs
mailing list