linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: overlay2: backporting a copy_file_range bug fix in Linux 5.6 to 5.10?
       [not found] <CAMBWrQnfGuMjF6pQfoj9U5abKBQpaYtSH11QFo4+jZrL32XUEg@mail.gmail.com>
@ 2021-12-04  7:15 ` Amir Goldstein
  2021-12-04  7:25   ` Stan Hu
  0 siblings, 1 reply; 2+ messages in thread
From: Amir Goldstein @ 2021-12-04  7:15 UTC (permalink / raw)
  To: Stan Hu; +Cc: linux-fsdevel, overlayfs, Miklos Szeredi

On Fri, Dec 3, 2021 at 8:20 PM Stan Hu <stanhu@gmail.com> wrote:
>
> A number of users have reported that under certain conditions using
> Docker and overlay2, copy_file_range() can unexpectedly create a
> 0-byte file: In https://github.com/docker/for-linux/issues/1015.
>
> We started seeing mysterious failures in our CI tests as a result of
> files not properly being copied.
>
> https://github.com/docker/for-linux/issues/1015#issuecomment-841915668
> has a sample reproduction test.
>
> I analyzed the diff between 5.10 and 5.11 and found that if I applied
> the following kernel patch, the reproduction test passes:
>
> https://lore.kernel.org/linux-fsdevel/20201207163255.564116-6-mszeredi@redhat.com/#t
>
> This landed in this merge commit and this commit:
>
> 1. https://github.com/torvalds/linux/commit/92dbc9dedccb9759c7f9f2f0ae6242396376988f
> 2. https://github.com/torvalds/linux/commit/82a763e61e2b601309d696d4fa514c77d64ee1be
>
> Could this patch be backported for kernels 5.6 to 5.10?

This problem is a regression from bug (missing update size of dest
file) in commit
1a980b8cbf00 ("ovl: add splice file read write helper")

The commit you want to backport fixes that problem, but introduces
another regression later fixed by commit
9b91b6b019fd ("ovl: fix deadlock in splice write")

So you'd need to backport both to end up with the correct
implementation of ovl_splice_write()

Thanks,
Amir.

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

* Re: overlay2: backporting a copy_file_range bug fix in Linux 5.6 to 5.10?
  2021-12-04  7:15 ` overlay2: backporting a copy_file_range bug fix in Linux 5.6 to 5.10? Amir Goldstein
@ 2021-12-04  7:25   ` Stan Hu
  0 siblings, 0 replies; 2+ messages in thread
From: Stan Hu @ 2021-12-04  7:25 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: linux-fsdevel, overlayfs, Miklos Szeredi

On Fri, Dec 3, 2021 at 11:15 PM Amir Goldstein <amir73il@gmail.com> wrote:

> So you'd need to backport both to end up with the correct
> implementation of ovl_splice_write()

Thanks! Both commits have already been queued for the stable 5.10
branch: https://lore.kernel.org/stable/Yanx6KobwiQoBQfU@kroah.com/#t

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

end of thread, other threads:[~2021-12-04  7:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMBWrQnfGuMjF6pQfoj9U5abKBQpaYtSH11QFo4+jZrL32XUEg@mail.gmail.com>
2021-12-04  7:15 ` overlay2: backporting a copy_file_range bug fix in Linux 5.6 to 5.10? Amir Goldstein
2021-12-04  7:25   ` Stan Hu

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