[PATCH 0/2] afs: avoid unhash/rehash
NeilBrown
neilb at ownmail.net
Wed Jul 1 18:58:28 PDT 2026
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
More information about the linux-afs
mailing list