linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Giuseppe Scrivano <gscrivan@redhat.com>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	Daniel J Walsh <dwalsh@redhat.com>,
	Steven Whitehouse <swhiteho@redhat.com>
Subject: Re: [PATCH v5] overlayfs: Provide a mount option "volatile" to skip sync
Date: Mon, 24 Aug 2020 09:39:48 -0400	[thread overview]
Message-ID: <20200824133948.GA963827@redhat.com> (raw)
In-Reply-To: <CAOQ4uxj0SF1VRbMEvVm4a9TuUtdMYuZqFkZhkUyEGMagCWk5NA@mail.gmail.com>

On Mon, Aug 24, 2020 at 01:59:41PM +0300, Amir Goldstein wrote:
> On Mon, Aug 24, 2020 at 11:15 AM Miklos Szeredi <miklos@szeredi.hu> wrote:
> >
> > On Sat, Aug 22, 2020 at 11:27 AM Giuseppe Scrivano <gscrivan@redhat.com> wrote:
> > >
> > > Vivek Goyal <vgoyal@redhat.com> writes:
> > >
> > > > Container folks are complaining that dnf/yum issues too many sync while
> > > > installing packages and this slows down the image build. Build
> > > > requirement is such that they don't care if a node goes down while
> > > > build was still going on. In that case, they will simply throw away
> > > > unfinished layer and start new build. So they don't care about syncing
> > > > intermediate state to the disk and hence don't want to pay the price
> > > > associated with sync.
> > > >
> >
> > [...]
> >
> > > Ping.
> > >
> > > Is there anything holding this patch?
> >
> > Not sure what happened with protection against mounting a volatile
> > overlay twice, I don't see that in the patch.
> 
> Do you mean protection only for new kernels or old kernels as well?
> 
> The latter can be achieved by using $workdir/volatile/ as upperdir
> instead of $upperdir.
> Or maybe even use $workdir/work/incompat/volatile/upper, so if older
> kernel tries to re-use that $workdir, it will fail to mount rw with error:
> 
>   overlayfs: cleanup of 'incompat/volatile' failed (-39)
> 
> If we agree to that, then upperdir= should not be provided at all when
> specifying "volatile".

If we keep volatile inside workdir, then we fail work and upperdir
being separate subtree checks. And I suspect that all that trap
magic will trigger too.

I think for image building use case, tools to have access to volatile
directory. So that they can persist it, rename it and use it as lower
layer for next layer build. That means we will have to document it
and let users access and rename $workdir/work/incompat/volatile/ or
$workdir/work/volatile.

Once Miklos has suggested to drop a file in workdir say $workdir/volatile
And next remount will refuse to mount that overlay instance if
$workdir/volatile is present. With this approach work/ and upper/
are in separate dir subtrees.

And user will be forced to remove work/ and upper/ if previous instance
was mounted with "volatile".

I am not too worried about protection against older kernels because if
system has been setup to boot into a new kernel, it will boot into
new kernel again. (Until and unless somebody forces it to go back to
old kernel). But if you think providing protection against old kernels
is important, we could create volatile in $workdir/work/dir1/dir2/volatile
instead.

/me is wondering why I don't get error with $workdir/work/dir1/volatile
but I do with $workdir/work/dir1/dir2/volatile. IOW, why in first
case removal of dir1 was successful despite the fact it is non-empty.

Thanks
Vivek


  parent reply	other threads:[~2020-08-24 13:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 17:50 [PATCH v5] overlayfs: Provide a mount option "volatile" to skip sync Vivek Goyal
2020-08-22  9:26 ` Giuseppe Scrivano
2020-08-24  8:15   ` Miklos Szeredi
2020-08-24 10:59     ` Amir Goldstein
2020-08-24 11:12       ` Miklos Szeredi
2020-08-24 11:39       ` Giuseppe Scrivano
2020-08-24 12:38         ` Amir Goldstein
2020-08-24 13:02           ` Giuseppe Scrivano
2020-08-24 13:20             ` Miklos Szeredi
2020-08-24 13:51               ` Vivek Goyal
2020-08-24 20:53                 ` Amir Goldstein
2020-08-24 21:00                   ` Vivek Goyal
2020-08-24 21:51                     ` Amir Goldstein
2020-08-25  0:55                       ` Vivek Goyal
2020-08-25  5:31                         ` Amir Goldstein
2020-08-25  9:18                           ` Miklos Szeredi
2020-08-25 18:23                           ` Daniel Walsh
2020-08-24 13:39       ` Vivek Goyal [this message]
2020-08-24 13:53         ` Miklos Szeredi

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=20200824133948.GA963827@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=dwalsh@redhat.com \
    --cc=gscrivan@redhat.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=swhiteho@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;
as well as URLs for NNTP newsgroup(s).