[PATCH v4 0/8] multiple-filesystems: prepare for changes to VFS locking
From: NeilBrown
Date: Sun Nov 29 2026 - 16:33:24 EST
So v3 was a bit of a disaster - sorry about that. I hope no-one spent
much time looking at it :-(
But I'm feeling better about this one - which doesn't try to do as much.
I've fixed up a whole bunch of problems that sashiko.dev found in the
afs patches, and made the procfs change a lot simpler. Hopefully it
isn't too simple - it does mean iterate_shared can sometimes do more
work, but I suspect the cost will be small.
I now understand the context of d_add_ci() and realise that it has
significant implications on my design. Any filesystem that uses
d_add_ci() cannot cache negative dentries because (it seems) there is no
canonical name for an equivalence classes of case-insensitive names.
And that means I cannot lock a "name" in a directory by locking the
corresponding dentry, at least not when the name doesn't exist yet.
I think I have a solution for d_add_ci(), but there is some non-trival
prep work needed so I'll delay that for now.
So here are tiny changes to coda and hostfs, several changes to afs, and the afore-mentioned change to readdir in procfs.
The goal is to
a: not drop dentries while an operation is on-going
b: not call d_alloc_parallel() while holding i_rwsem on the parent.
I'll follow up if sasiko.dev is happy, so feel free to ignore these until
that follow-up.
Thanks,
NeilBrown
[PATCH v4 1/8] coda: don't d_drop() early.
[PATCH v4 2/8] hostfs: don't d_drop() before d_splice_alias() in
[PATCH v4 3/8] afs: don't unhash/rehash dentries during unlink/rename
[PATCH v4 4/8] afs: use d_splice_alias() in afs_vnode_new_inode()
[PATCH v4 5/8] afs: use d_alloc_trylock in afs_sillyrename()
[PATCH v4 6/8] afs: use d_duplicate()
[PATCH v4 7/8] procfs: drop parent lock for d_alloc_parallel() in
[PATCH v4 8/8] afs: lookup_atsys to drop and reclaim lock.