Linux Overlay Filesystem development
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Matt Coffin <mcoffin13@gmail.com>
Cc: Daniel Walsh <dwalsh@redhat.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Amir Goldstein <amir73il@gmail.com>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	Nalin Dahyabhai <nalin@redhat.com>
Subject: Re: [PATCH v2] overlay: allow config override of metacopy/redirect defaults
Date: Wed, 12 Jun 2019 08:32:15 -0400	[thread overview]
Message-ID: <20190612123215.GA27088@redhat.com> (raw)
In-Reply-To: <be9bfd25-ff48-bd9e-25ff-aa2a5f5873ed@gmail.com>

On Tue, Jun 11, 2019 at 03:57:03PM -0600, Matt Coffin wrote:
> This could just be because I don't understand the implications here, but
> wouldn't it be easier, at least for now, to just mount with
> 
> redirect_dir=0,metacopy=0
> 
> in the mount parameters when building images, but allow the user's
> default settings to still take over when just executing a container?

I think that's what docker does by default, isn't it? That is redirect_dir
and metacopy features are disabled by default (until and unless user
decides to enable it).

Dan walsh recently changed podman to enable metacopy feature by default
(which in-turn will enable redirect as well). He wants to make use of
user namespaces with containers and chown the images with metacopy
enabled. We don't have shiftfs upstream yet.

BTW, how slow is image building with naivediff interface.

Vivek

> 
> On 6/11/19 3:49 PM, Vivek Goyal wrote:
> > On Tue, Jun 11, 2019 at 05:44:33PM -0400, Daniel Walsh wrote:
> >> On 6/11/19 9:09 AM, Vivek Goyal wrote:
> >>> On Tue, Jun 11, 2019 at 02:37:34PM +0200, Miklos Szeredi wrote:
> >>>> On Mon, Jun 10, 2019 at 8:45 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> >>>> AFAICS what happens when generating a layer is to start with a clean
> >>>> upper layer, do some operations, then save the contents of the upper
> >>>> layer.  If redirect or metacopy is enabled, then the contents of the
> >>>> upper layer won't be portable.  So need to do something like this:
> >>>>
> >>>> traverse(overlay_dir, upper_dir, target_dir)
> >>>> {
> >>>>     iterate name for entries in $upper_dir {
> >>>>         if ($name is non-directory) {
> >>>>             copy($overlay_dir/$name, $target_dir/$name)
> >>>>         } else if ($name is redirect) {
> >>>>             copy-recursive($overlay_dir/$name, $target_dir/$name)
> >>>>         } else {
> >>>>             copy($overlay_dir/$name, $target_dir/$name)
> >>>>             traverse($overlay_dir/$name, $upper_dir/$name, $target_dir/$name)
> >>>>         }
> >>>>     }
> >>>> }
> >>>>
> >>>> Basically: traverse the *upper layer* but copy files and directories
> >>>> from the *overlay*.  Does that make sense?

  parent reply	other threads:[~2019-06-12 12:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07  1:04 [PATCH] overlay: allow config override of metacopy/redirect defaults Matt Coffin
2019-06-07 20:51 ` [PATCH v2] " Matt Coffin
2019-06-08  9:04   ` Amir Goldstein
2019-06-08 17:28     ` Matt Coffin
2019-06-08 18:47       ` Amir Goldstein
2019-06-09 19:14         ` Miklos Szeredi
2019-06-10 18:40           ` Vivek Goyal
2019-06-10 18:45             ` Vivek Goyal
2019-06-11 12:37               ` Miklos Szeredi
2019-06-11 13:09                 ` Vivek Goyal
2019-06-11 21:44                   ` Daniel Walsh
2019-06-11 21:49                     ` Vivek Goyal
2019-06-11 21:57                       ` Matt Coffin
2019-06-11 23:09                         ` Daniel Walsh
2019-06-12 12:32                         ` Vivek Goyal [this message]
2019-06-10 18:30     ` Vivek Goyal
2019-06-10 18:51       ` Amir Goldstein

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=20190612123215.GA27088@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=dwalsh@redhat.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=mcoffin13@gmail.com \
    --cc=miklos@szeredi.hu \
    --cc=nalin@redhat.com \
    /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