From: Amir Goldstein <amir73il@gmail.com>
To: NeilBrown <neil@brown.name>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 00/20 v2] ovl: narrow regions protected by i_rw_sem
Date: Fri, 11 Jul 2025 18:41:17 +0200 [thread overview]
Message-ID: <CAOQ4uxhC_ARYQ=mPMEX9pLQTeXcBcJGqn8RK-tmE26W8pGChKA@mail.gmail.com> (raw)
In-Reply-To: <20250710232109.3014537-1-neil@brown.name>
On Fri, Jul 11, 2025 at 1:21 AM NeilBrown <neil@brown.name> wrote:
>
> This is a revised set of patches following helpful feedback. There are
> now more patches, but they should be a lot easier to review.
I confirm that this set was "reviewable" :)
No major comments on my part, mostly petty nits.
I would prefer to see parent_lock/unlock helpers in vfs for v3,
but if you prefer to keep the prep patches internal to ovl, that's fine too.
In that case I'd prefer to use ovl_parent_lock/unlock, but if that's too
painful, don't bother.
Thanks,
Amir.
>
> 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()
next prev parent reply other threads:[~2025-07-11 16:41 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Amir Goldstein [this message]
2025-07-14 5:57 ` [PATCH 00/20 v2] ovl: narrow regions protected by i_rw_sem Amir Goldstein
2025-07-16 0:13 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOQ4uxhC_ARYQ=mPMEX9pLQTeXcBcJGqn8RK-tmE26W8pGChKA@mail.gmail.com' \
--to=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=neil@brown.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).