[Virtio-fs] [fuse-devel] 'FORGET' ordering semantics (vs unlink & NFS)

Nikolaus Rath Nikolaus at rath.org
Tue Jan 5 10:11:41 UTC 2021


On Jan 04 2021, "Dr. David Alan Gilbert" <dgilbert at redhat.com> wrote:
> Hi,
>   On virtio-fs we're hitting a problem with NFS, where
> unlinking a file in a directory and then rmdir'ing that
> directory fails complaining about the directory not being empty.
>
> The problem here is that if a file has an open fd, NFS doesn't
> actually delete the file on unlink, it just renames it to
> a hidden file (e.g. .nfs*******).  That open file is there because
> the 'FORGET' hasn't completed yet by the time the rmdir is issued.


Are you really talking about FORGET and file descriptors here? I always
assumed that the kernel will only drop dentries (aka emit FORGET) when
all fds are closed and never saw otherwise in practice.

Do you mean RELEASE rather than FORGET, or dentry rather than file descriptor?

Best,
-Nikolaus

-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«





More information about the Virtio-fs mailing list