Handling deleted files which are still open on the Linux client

Tom Talpey tom at talpey.com
Thu Apr 10 05:54:17 UTC 2025


On 4/9/2025 3:51 PM, Pali Rohár wrote:
> ...
> Note that NFS3 (client) has similar problem. Its unlink syscall is
> implemented as silly-rename, it just rename file and disallow opening
> it. But the directory entry still exists, other users can call "stat" on
> it, just cannot open it.
Um, the sillyrename can certainly be seen and even reopened, removed,
or rewritten. It's only special to the client that renamed it because
some process had it open. The NFSv3 client on that machine is the only
entity that prevents opening. Another protocol from the same client,
or pretty much any other access on the server will sail right through.
It's called "silly" for a good reason.

You're correct that DOLC can be "canceled", but a) I'm not sure it's
ever really done and b) a Posix client can't even do it. So we're
talking about a two-protocol problem. Let's not go down ratholes.

My main concern with EBUSY is the fact that it's a change, and to
somehow "improve" a situation that doesn't seem like a bug. It
seems much riskier to change it than to just keep living with it.

Tom.



More information about the samba-technical mailing list