linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/15] Create and use APIs to centralise locking for directory ops.
@ 2025-11-13  0:18 NeilBrown
  2025-11-13  0:18 ` [PATCH v6 01/15] debugfs: rename end_creating() to debugfs_end_creating() NeilBrown
                   ` (16 more replies)
  0 siblings, 17 replies; 36+ messages in thread
From: NeilBrown @ 2025-11-13  0:18 UTC (permalink / raw)
  To: Alexander Viro, Christian Brauner, Amir Goldstein
  Cc: Jan Kara, linux-fsdevel, Jeff Layton, Chris Mason, David Sterba,
	David Howells, Greg Kroah-Hartman, Rafael J. Wysocki,
	Danilo Krummrich, Tyler Hicks, Miklos Szeredi, Chuck Lever,
	Olga Kornievskaia, Dai Ngo, Namjae Jeon, Steve French,
	Sergey Senozhatsky, Carlos Maiolino, John Johansen, Paul Moore,
	James Morris, Serge E. Hallyn, Stephen Smalley, Ondrej Mosnacek,
	Mateusz Guzik, Lorenzo Stoakes, Stefan Berger, Darrick J. Wong,
	linux-kernel, netfs, ecryptfs, linux-nfs, linux-unionfs,
	linux-cifs, linux-xfs, linux-security-module, selinux

Following is a new version of this series:
 - fixed a bug found by syzbot
 - cleanup suggested by Stephen Smalley
 - added patch for missing updates in smb/server - thanks Jeff Layton
 - various s-o-b


Previous description:

 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 v6 01/15] debugfs: rename end_creating() to
 [PATCH v6 02/15] VFS: introduce start_dirop() and end_dirop()
 [PATCH v6 03/15] VFS: tidy up do_unlinkat()
 [PATCH v6 04/15] VFS/nfsd/cachefiles/ovl: add start_creating() and
 [PATCH v6 05/15] VFS/nfsd/cachefiles/ovl: introduce start_removing()
 [PATCH v6 06/15] VFS: introduce start_creating_noperm() and
 [PATCH v6 07/15] smb/server: use end_removing_noperm for for target
 [PATCH v6 08/15] VFS: introduce start_removing_dentry()
 [PATCH v6 09/15] VFS: add start_creating_killable() and
 [PATCH v6 10/15] VFS/nfsd/ovl: introduce start_renaming() and
 [PATCH v6 11/15] VFS/ovl/smb: introduce start_renaming_dentry()
 [PATCH v6 12/15] Add start_renaming_two_dentries()
 [PATCH v6 13/15] ecryptfs: use new start_creating/start_removing APIs
 [PATCH v6 14/15] VFS: change vfs_mkdir() to unlock on failure.
 [PATCH v6 15/15] VFS: introduce end_creating_keep()

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

end of thread, other threads:[~2025-12-05 13:09 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13  0:18 [PATCH v6 00/15] Create and use APIs to centralise locking for directory ops NeilBrown
2025-11-13  0:18 ` [PATCH v6 01/15] debugfs: rename end_creating() to debugfs_end_creating() NeilBrown
2025-11-13  0:18 ` [PATCH v6 02/15] VFS: introduce start_dirop() and end_dirop() NeilBrown
2025-11-13  0:18 ` [PATCH v6 03/15] VFS: tidy up do_unlinkat() NeilBrown
2025-11-13  0:18 ` [PATCH v6 04/15] VFS/nfsd/cachefiles/ovl: add start_creating() and end_creating() NeilBrown
2025-11-13  0:18 ` [PATCH v6 05/15] VFS/nfsd/cachefiles/ovl: introduce start_removing() and end_removing() NeilBrown
2025-11-13  0:18 ` [PATCH v6 06/15] VFS: introduce start_creating_noperm() and start_removing_noperm() NeilBrown
2025-11-30  0:01   ` Val Packett
2025-11-30  0:19     ` Al Viro
2025-11-30 22:06     ` [PATCH] fuse: fix conversion of fuse_reverse_inval_entry() to start_removing() NeilBrown
2025-12-01  8:22       ` Amir Goldstein
2025-12-01  8:33         ` Al Viro
2025-12-01 14:03           ` Miklos Szeredi
2025-12-01 17:08             ` Al Viro
2025-12-02  8:46               ` Miklos Szeredi
2025-12-05 13:09             ` Christian Brauner
2025-12-01  8:50         ` NeilBrown
2025-12-01  8:56           ` Al Viro
2025-11-13  0:18 ` [PATCH v6 07/15] smb/server: use end_removing_noperm for for target of smb2_create_link() NeilBrown
2025-11-13  0:18 ` [PATCH v6 08/15] VFS: introduce start_removing_dentry() NeilBrown
2025-11-13  0:18 ` [PATCH v6 09/15] VFS: add start_creating_killable() and start_removing_killable() NeilBrown
2025-11-13  0:18 ` [PATCH v6 10/15] VFS/nfsd/ovl: introduce start_renaming() and end_renaming() NeilBrown
2025-11-13  0:18 ` [PATCH v6 11/15] VFS/ovl/smb: introduce start_renaming_dentry() NeilBrown
2025-11-13  0:18 ` [PATCH v6 12/15] Add start_renaming_two_dentries() NeilBrown
2025-11-17 23:04   ` Paul Moore
2025-11-13  0:18 ` [PATCH v6 13/15] ecryptfs: use new start_creating/start_removing APIs NeilBrown
2025-11-13  0:18 ` [PATCH v6 14/15] VFS: change vfs_mkdir() to unlock on failure NeilBrown
2025-11-13  0:18 ` [PATCH v6 15/15] VFS: introduce end_creating_keep() NeilBrown
2025-11-14 12:24 ` [PATCH v6 00/15] Create and use APIs to centralise locking for directory ops Christian Brauner
2025-11-14 14:05   ` Jeff Layton
2025-11-14 14:23   ` Christian Brauner
2025-11-14 14:52     ` Jeff Layton
2025-11-14 22:00       ` Christian Brauner
2025-11-27 11:11     ` NeilBrown
2025-11-27 11:06   ` NeilBrown
2025-11-14 12:27 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).