Re: [PATCH 0/2] overlayfs lock ordering changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 11, 2023 at 4:06 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Thu, 20 Jul 2023 at 17:37, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> >
> > Hi Miklos,
> >
> > These prep patches are needed for my start-write-safe series [1].
> > This is not urgent and the prep patches don't need to be merged
> > for next cycle, but I think these are good changes regardless,
> > so wanted to post them for early review - if you like them you can
> > queue them for 6.6.
> >
> > It is quite hard to do the review of the locking reorder patch from the
> > diff itself and I couldn't figure out a better way to split this change.
> > I've intentionally left some otherwise useless out: goto labels to
> > make the patch review a bit simper - they could be removed later.
> >
> > On the good side, lockdep was very tough with me and it easily detected
> > bugs in the earlier versions of the patches.
> >
> > Going on vacation. will be back round rc6.
> >
> > Thanks,
> > Amir.
> >
> > [1] https://github.com/amir73il/linux/commits/start-write-safe
> >
> > Amir Goldstein (2):
> >   ovl: reorder ovl_want_write() after ovl_inode_lock()
>
> This one generally looks good.  The failure paths will need careful
> review, because those are usually not exercised by the test suites.
>
> >   ovl: avoid lockdep warning with open and llseek of lower file
>
> But I dislike this one.  Seems like a bad workaround for a possibly
> non-issue.  I understand the desire to silence lockdep, but surely we
> can do better.

Well, I didn't do it to silence lockdep. I did it as a prereq for
start-write-safe fsnotify hooks (see [1] above).
Silencing lockdep is an added bonus that I observed along the way.

v2 [2] has a less hacky, but more noisy version of this patch which
minimizes the scope of ovl_want_write() to when we need it.
Let me know if this is what you had in mind.

After looking more closely, I found another possible deadlock with
nested overlay, which I think is real and added another commit to fix it.

[2] https://github.com/amir73il/linux/commits/ovl_want_write-v2

Thanks,
Amir.




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux