[CRIU] OverlayFS Patch

Gabriel Guimaraes gabriellimaguimaraes at gmail.com
Thu Aug 6 09:56:39 PDT 2015


Good idea about the overlayfs_parse! I also added comments explaining that
this works with and without the Kernel fixes and that we can't rely on
stat-ing the file descriptor.



2015-08-06 7:46 GMT-07:00 Pavel Emelyanov <xemul at parallels.com>:

> On 08/06/2015 04:50 PM, Filipe Brandenburger wrote:
> > On Thu, Aug 6, 2015 at 2:14 AM, Pavel Emelyanov <xemul at parallels.com>
> wrote:
> >> On 08/06/2015 02:21 AM, Gabriel Guimaraes wrote:
> >>> So I just tested it and it turns out that, because of the Kernel bug,
> statfs returns ext2/ext3 instead
> >>> of OVERLAYFS_MAGIC when used on a symlink to a file in an OVFs
> directory, so we can't rely on that.
> >>
> >> I see :) Yet another patch idea for the kernel.
> >
> > Not really though...
> >
> > As of kernel 4.2-rc2, all the kernel overlayfs bugs are fixed (in
> > particular the ones fixing the paths of the symlinks under
> > /proc/*/fd/*), so on that kernel version criu without this patchset
> > works to checkpoint/restore containers using overlayfs.
>
> Ah, I see. I thought that the only bad thing we were fixing was the
> wrong path shown in /proc/pid/fd.
>
> > This patch is meant to work around the bugs present in 3.18ish up to
> > 4.2 when the issue has been resolved.
> >
> > If we could go back in time to have a kernel patch applied, we should
> > instead apply the patchset that actually fixed the issue in 4.2 :-)
> >
> > The patches that fixed the overlayfs issues are listed here:
> > http://criu.org/Docker#OverlayFS and I believe Ubuntu Vivid might get
> > these backports into their 3.19.
> >
> > Gabriel's code will work properly on both the kernel with and without
> the fixes.
> >
> > Not sure if this was clear from the original submission... Perhaps in
> > light of these facts you'd like to have some comments or commit
> > descriptions rephrased to indicate that this code is there to support
> > kernels in that version range?
>
> Yes, a comment in the fact that we can't even rely on stat()-ing the
> file descriptor would be good, thanks.
>
> -- Pavel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150806/8f8409df/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlayfs.patch
Type: text/x-patch
Size: 9924 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150806/8f8409df/attachment.bin>


More information about the CRIU mailing list