summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-09-25 16:27:33 +0200
committerChristian Brauner <brauner@kernel.org>2026-09-25 16:27:33 +0200
commit3879f51857325da9bf3cfb073280257cd16ae067 (patch)
treea6059679082b378cd32718c6295c877cee4c0105 /tools/lib/python
parent161ce1e692d01ddec0522f24a29535ac59a3afaf (diff)
parentfd96e30426ff3e1352309ccf6843dc7fd9d38fde (diff)
downloadlinux-next-3879f51857325da9bf3cfb073280257cd16ae067.tar.gz
linux-next-3879f51857325da9bf3cfb073280257cd16ae067.zip
Merge patch series "VFS: prepare for changes to directory locking"
NeilBrown <neilb@ownmail.net> says: As you know I am working on changes to locking for directory operations such as lookup/create/remove/rename. The ultimate goal is for the VFS to lock the dentry, not the parent directory, and to push the i_rwsem parent locking down into the filesystems where it can be kept, removed, or adjusted as best fits each filesystem. The next step is to change the order of locking for d_alloc_parallel() - which allocates a locked (in-lookup) dentry or waits for an existing dentry to be unlocked. Currently d_alloc_parallel() is ordered below i_rwsem on parent, so you cannot wait on i_rwsem while holding a locked (in-lookup) dentry. To push i_rwsem into filesystems I need to push i_rwsem below d_alloc_parallel(), so code can wait for i_rwsem while holding an in-lookup dentry, but won't be able to wait in d_alloc_parallel() while holding i_rwsem. There are two broad changes that are needed before that order can be swapped. This series sets the direction. Subsequent patches which I hope can also land this cycle spread those changes throughout filesystems. The two changes are: 1 - don't call d_alloc_parallel() while holding i_rwsem. This involves introducing d_alloc_trylock() and changing some places to drop i_rwsem before taking d_alloc_parallel() for this to work they will need to know if the lock is shared or exclusive so LOOKUP_SHARED is added. 2 - don't d_drop() a dentry while it being worked on. This might not be entirely needed yet, but it will be needed soon and doing it now is a convenient time, and it helps make the end result clearer. Calling d_drop() effectively unlocks an in-lookup denty. It is OK for a filesystem to do this *after* an operation has completed, whether in success or failure. Doing it before completion will allow another dentry to be allocated maybe too early. Enhancing d_splice_alias() to handle hashed dentries is key to removing the need to d_drop() in filesystems. Though not strictly necessary, this allows d_add() to be removed as there will be nothing that d_add() does which cannot be done with d_splice_alias() * patches from https://patch.msgid.link/20260904215142.1060510-1-neilb@ownmail.net: VFS: reserve a d_flags bit for fs-specific usage VFS: add lockdep monitoring of DCACHE_PAR_LOOKUP lock. VFS: Add LOOKUP_SHARED flag. VFS: add d_duplicate() VFS: introduce d_alloc_trylock() VFS: enhance d_splice_alias() to handle hashed dentries VFS: fix various typos in documentation for start_creating start_removing etc Link: https://patch.msgid.link/20260904215142.1060510-1-neilb@ownmail.net Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions