linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20 v2] ovl: narrow regions protected by i_rw_sem
@ 2025-07-10 23:03 NeilBrown
  2025-07-10 23:03 ` [PATCH 01/20] ovl: simplify an error path in ovl_copy_up_workdir() NeilBrown
                   ` (20 more replies)
  0 siblings, 21 replies; 54+ messages in thread
From: NeilBrown @ 2025-07-10 23:03 UTC (permalink / raw)
  To: Miklos Szeredi, Amir Goldstein; +Cc: linux-unionfs, linux-fsdevel

This is a revised set of patches following helpful feedback.  There are
now more patches, but they should be a lot easier to review.

These patches are all in a git tree at
   https://github.com/neilbrown/linux/commits/pdirops
though there a lot more patches there too - demonstrating what is to come.
0eaa1c629788 ovl: rename ovl_cleanup_unlocked() to ovl_cleanup()
is the last in the series posted here.

I welcome further review.

Original description:

This series of patches for overlayfs is primarily focussed on preparing
for some proposed changes to directory locking.  In the new scheme we
will lock individual dentries in a directory rather than the whole
directory.

ovl currently will sometimes lock a directory on the upper filesystem
and do a few different things while holding the lock.  This is
incompatible with the new scheme.

This series narrows the region of code protected by the directory lock,
taking it multiple times when necessary.  This theoretically open up the
possibilty of other changes happening on the upper filesytem between the
unlock and the lock.  To some extent the patches guard against that by
checking the dentries still have the expect parent after retaking the
lock.  In general, I think ovl would have trouble if upperfs were being
changed independantly, and I don't think the changes here increase the
problem in any important way.

I have tested this with fstests, both generic and unionfs tests.  I
wouldn't be surprised if I missed something though, so please review
carefully.

After this series (with any needed changes) lands I will resubmit my
change to vfs_rmdir() behaviour to have it drop the lock on error.  ovl
will be much better positioned to handle that change.  It will come with
the new "lookup_and_lock" API that I am proposing.

Thanks,
NeilBrown


 [PATCH 01/20] ovl: simplify an error path in ovl_copy_up_workdir()
 [PATCH 02/20] ovl: change ovl_create_index() to take write and dir
 [PATCH 03/20] ovl: Call ovl_create_temp() without lock held.
 [PATCH 04/20] ovl: narrow the locked region in ovl_copy_up_workdir()
 [PATCH 05/20] ovl: narrow locking in ovl_create_upper()
 [PATCH 06/20] ovl: narrow locking in ovl_clear_empty()
 [PATCH 07/20] ovl: narrow locking in ovl_create_over_whiteout()
 [PATCH 08/20] ovl: narrow locking in ovl_rename()
 [PATCH 09/20] ovl: narrow locking in ovl_cleanup_whiteouts()
 [PATCH 10/20] ovl: narrow locking in ovl_cleanup_index()
 [PATCH 11/20] ovl: narrow locking in ovl_workdir_create()
 [PATCH 12/20] ovl: narrow locking in ovl_indexdir_cleanup()
 [PATCH 13/20] ovl: narrow locking in ovl_workdir_cleanup_recurse()
 [PATCH 14/20] ovl: change ovl_workdir_cleanup() to take dir lock as
 [PATCH 15/20] ovl: narrow locking on ovl_remove_and_whiteout()
 [PATCH 16/20] ovl: change ovl_cleanup_and_whiteout() to take rename
 [PATCH 17/20] ovl: narrow locking in ovl_whiteout()
 [PATCH 18/20] ovl: narrow locking in ovl_check_rename_whiteout()
 [PATCH 19/20] ovl: change ovl_create_real() to receive dentry parent
 [PATCH 20/20] ovl: rename ovl_cleanup_unlocked() to ovl_cleanup()

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

end of thread, other threads:[~2025-07-16  3:55 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10 23:03 [PATCH 00/20 v2] ovl: narrow regions protected by i_rw_sem NeilBrown
2025-07-10 23:03 ` [PATCH 01/20] ovl: simplify an error path in ovl_copy_up_workdir() NeilBrown
2025-07-11  8:25   ` Amir Goldstein
2025-07-11 10:30     ` Amir Goldstein
2025-07-14  0:13     ` NeilBrown
2025-07-14  5:42       ` parent_lock/unlock (Was: [PATCH 01/20] ovl: simplify an error path in ovl_copy_up_workdir()) Amir Goldstein
2025-07-16  3:55         ` NeilBrown
2025-07-10 23:03 ` [PATCH 02/20] ovl: change ovl_create_index() to take write and dir locks NeilBrown
2025-07-11 10:41   ` Amir Goldstein
2025-07-14  0:14     ` NeilBrown
2025-07-10 23:03 ` [PATCH 03/20] ovl: Call ovl_create_temp() without lock held NeilBrown
2025-07-11 11:10   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 04/20] ovl: narrow the locked region in ovl_copy_up_workdir() NeilBrown
2025-07-11 12:03   ` Amir Goldstein
2025-07-14  0:29     ` NeilBrown
2025-07-10 23:03 ` [PATCH 05/20] ovl: narrow locking in ovl_create_upper() NeilBrown
2025-07-11 12:09   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 06/20] ovl: narrow locking in ovl_clear_empty() NeilBrown
2025-07-11 12:27   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 07/20] ovl: narrow locking in ovl_create_over_whiteout() NeilBrown
2025-07-11 12:42   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 08/20] ovl: narrow locking in ovl_rename() NeilBrown
2025-07-11 13:03   ` Amir Goldstein
2025-07-14  1:00     ` NeilBrown
2025-07-14  5:12       ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 09/20] ovl: narrow locking in ovl_cleanup_whiteouts() NeilBrown
2025-07-10 23:03 ` [PATCH 10/20] ovl: narrow locking in ovl_cleanup_index() NeilBrown
2025-07-11 13:12   ` Amir Goldstein
2025-07-14  1:03     ` NeilBrown
2025-07-10 23:03 ` [PATCH 11/20] ovl: narrow locking in ovl_workdir_create() NeilBrown
2025-07-11 13:32   ` Amir Goldstein
2025-07-14  1:08     ` NeilBrown
2025-07-10 23:03 ` [PATCH 12/20] ovl: narrow locking in ovl_indexdir_cleanup() NeilBrown
2025-07-11 13:33   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 13/20] ovl: narrow locking in ovl_workdir_cleanup_recurse() NeilBrown
2025-07-11 13:35   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 14/20] ovl: change ovl_workdir_cleanup() to take dir lock as needed NeilBrown
2025-07-11 13:28   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 15/20] ovl: narrow locking on ovl_remove_and_whiteout() NeilBrown
2025-07-11 13:42   ` Amir Goldstein
2025-07-14  1:35     ` NeilBrown
2025-07-10 23:03 ` [PATCH 16/20] ovl: change ovl_cleanup_and_whiteout() to take rename lock as needed NeilBrown
2025-07-11 13:50   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 17/20] ovl: narrow locking in ovl_whiteout() NeilBrown
2025-07-11 15:19   ` Amir Goldstein
2025-07-14  1:44     ` NeilBrown
2025-07-10 23:03 ` [PATCH 18/20] ovl: narrow locking in ovl_check_rename_whiteout() NeilBrown
2025-07-11 13:54   ` Amir Goldstein
2025-07-10 23:03 ` [PATCH 19/20] ovl: change ovl_create_real() to receive dentry parent NeilBrown
2025-07-10 23:03 ` [PATCH 20/20] ovl: rename ovl_cleanup_unlocked() to ovl_cleanup() NeilBrown
2025-07-11  9:57   ` Amir Goldstein
2025-07-11 16:41 ` [PATCH 00/20 v2] ovl: narrow regions protected by i_rw_sem Amir Goldstein
2025-07-14  5:57   ` Amir Goldstein
2025-07-16  0:13     ` NeilBrown

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).