Re: [PATCH v2] overlay: allow config override of metacopy/redirect defaults

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

 



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?

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@xxxxxxxxxx> 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?



[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