Linux filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] afs: avoid unhash/rehash
@ 2026-07-02  1:58 NeilBrown
  2026-07-02  1:58 ` [PATCH 1/2] afs: use d_time instead of d_fsdata NeilBrown
  2026-07-02  1:58 ` [PATCH 2/2] afs: don't unhash/rehash dentries during unlink/rename NeilBrown
  0 siblings, 2 replies; 8+ messages in thread
From: NeilBrown @ 2026-07-02  1:58 UTC (permalink / raw)
  To: David Howells, Marc Dionne; +Cc: linux-afs, linux-fsdevel

afs (like nfs and others) needs to block "open" requests while
processing an unlink or rename because if the target is to be unlinked
on the server, then the open must fail or create a new file, which needs
to wait for the unlink to complete.

It does this by unhashing the dentry and later rehashing it.  This will
cause problems for proposed changes to locking which will lock the
dentry rather than the parent directory.  Unhashing will effectively
unlock the name.

The second patch here addresses this by using ->d_fsdata to mark a
dentry as being busy in unlink/rename and waiting in d_revalidate for
that mark to be removed.  This is the same approach that NFS has used
for a while.

The first patch frees up ->d_fsdata which is currently otherwised use.
It is being used for a purpose that ->d_time is more suitable for so the
first patch switches to use d_time.

Thanks,
NeilBrown

 [PATCH 1/2] afs: use d_time instead of d_fsdata
 [PATCH 2/2] afs: don't unhash/rehash dentries during unlink/rename

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-02 10:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  1:58 [PATCH 0/2] afs: avoid unhash/rehash NeilBrown
2026-07-02  1:58 ` [PATCH 1/2] afs: use d_time instead of d_fsdata NeilBrown
2026-07-02  8:54   ` David Howells
2026-07-02 10:12     ` NeilBrown
2026-07-02  9:09   ` David Howells
2026-07-02 10:27     ` NeilBrown
2026-07-02 10:53       ` David Howells
2026-07-02  1:58 ` [PATCH 2/2] afs: don't unhash/rehash dentries during unlink/rename NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox