[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251029234353.1321957-1-neilb@ownmail.net>
Date: Thu, 30 Oct 2025 10:31:00 +1100
From: NeilBrown <neilb@...mail.net>
To: "Alexander Viro" <viro@...iv.linux.org.uk>,
"Christian Brauner" <brauner@...nel.org>,
"Amir Goldstein" <amir73il@...il.com>
Cc: "Jan Kara" <jack@...e.cz>, linux-fsdevel@...r.kernel.org,
Jeff Layton <jlayton@...nel.org>, Chris Mason <clm@...com>,
David Sterba <dsterba@...e.com>, David Howells <dhowells@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>, Tyler Hicks <code@...icks.com>,
Miklos Szeredi <miklos@...redi.hu>, Chuck Lever <chuck.lever@...cle.com>,
Olga Kornievskaia <okorniev@...hat.com>, Dai Ngo <Dai.Ngo@...cle.com>,
Namjae Jeon <linkinjeon@...nel.org>, Steve French <smfrench@...il.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Carlos Maiolino <cem@...nel.org>,
John Johansen <john.johansen@...onical.com>,
Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Stephen Smalley <stephen.smalley.work@...il.com>,
Ondrej Mosnacek <omosnace@...hat.com>, Mateusz Guzik <mjguzik@...il.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Stefan Berger <stefanb@...ux.ibm.com>,
"Darrick J. Wong" <djwong@...nel.org>, linux-kernel@...r.kernel.org,
netfs@...ts.linux.dev, ecryptfs@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-unionfs@...r.kernel.org,
linux-cifs@...r.kernel.org, linux-xfs@...r.kernel.org,
apparmor@...ts.ubuntu.com, linux-security-module@...r.kernel.org,
selinux@...r.kernel.org
Subject: [PATCH v4 00/14] Create and use APIs to centralise locking for directory ops.
Hi all,
this series is the next part of my effort to change directory-op
locking to allow multiple concurrent ops in a directory. Ultimately we
will (in my plan) lock the target dentry(s) rather than the whole
parent directory.
To help with changing the locking protocol, this series centralises
locking and lookup in some helpers. The various helpers are introduced
and then used in the same patch - roughly one patch per helper though
with various exceptions.
I haven't introduced these helpers into the various filesystems that
Al's tree-in-dcache series is changing. That series introduces and
uses similar helpers tuned to the specific needs of that set of
filesystems. Ultimately all the helpers will use the same backends
which can then be adjusted when it is time to change the locking
protocol.
One change that deserves highlighting is in patch 13 where vfs_mkdir()
is changed to unlock the parent on failure, as well as the current
behaviour of dput()ing the dentry on failure. Once this change is in
place, the final step of both create and an remove sequences only
requires the target dentry, not the parent. So e.g. end_creating() is
only given the dentry (which may be IS_ERR() after vfs_mkdir()). This
helps establish the pattern that it is the dentry that is being locked
and unlocked (the lock is currently held on dentry->d_parent->d_inode,
but that can change).
Please review the changes I've made to your respective code areas and
let us know of any problems.
Thanks,
NeilBrown
[PATCH v4 01/14] debugfs: rename end_creating() to
[PATCH v4 02/14] VFS: introduce start_dirop() and end_dirop()
[PATCH v4 03/14] VFS: tidy up do_unlinkat()
[PATCH v4 04/14] VFS/nfsd/cachefiles/ovl: add start_creating() and
[PATCH v4 05/14] VFS/nfsd/cachefiles/ovl: introduce start_removing()
[PATCH v4 06/14] VFS: introduce start_creating_noperm() and
[PATCH v4 07/14] VFS: introduce start_removing_dentry()
[PATCH v4 08/14] VFS: add start_creating_killable() and
[PATCH v4 09/14] VFS/nfsd/ovl: introduce start_renaming() and
[PATCH v4 10/14] VFS/ovl/smb: introduce start_renaming_dentry()
[PATCH v4 11/14] Add start_renaming_two_dentries()
[PATCH v4 12/14] ecryptfs: use new start_creating/start_removing APIs
[PATCH v4 13/14] VFS: change vfs_mkdir() to unlock on failure.
[PATCH v4 14/14] VFS: introduce end_creating_keep()
Powered by blists - more mailing lists