linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Sargun Dhillon <sargun@sargun.me>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Amir Goldstein <amir73il@gmail.com>,
	Giuseppe Scrivano <gscrivan@redhat.com>,
	Daniel J Walsh <dwalsh@redhat.com>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH v1 2/3] overlay: Add the ability to remount volatile directories when safe
Date: Wed, 25 Nov 2020 13:43:05 -0500	[thread overview]
Message-ID: <20201125184305.GE3095@redhat.com> (raw)
In-Reply-To: <CAMp4zn_jR28x4P21QaHJV8AzG90ZZO3=K+pDVwNovP1m3hf7pw@mail.gmail.com>

On Wed, Nov 25, 2020 at 10:31:36AM -0800, Sargun Dhillon wrote:
> On Wed, Nov 25, 2020 at 10:17 AM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > On Wed, Nov 25, 2020 at 02:46:20AM -0800, Sargun Dhillon wrote:
> >
> > [..]
> > > @@ -1125,16 +1183,19 @@ static int ovl_workdir_cleanup_recurse(struct path *path, int level)
> > >                       if (p->len == 2 && p->name[1] == '.')
> > >                               continue;
> > >               } else if (incompat) {
> > > -                     pr_err("overlay with incompat feature '%s' cannot be mounted\n",
> > > -                             p->name);
> > > -                     err = -EINVAL;
> > > -                     break;
> > > +                     err = ovl_check_incompat(ofs, p, path);
> > > +                     if (err < 0)
> > > +                             break;
> > > +                     /* Skip cleaning this */
> > > +                     if (err == 1)
> > > +                             continue;
> > >               }
> >
> > Shouldn't we clean volatile/dirty on non-volatile mount. I did a
> > volatile mount followed by a non-volatile remount and I still
> > see work/incompat/volatile/dirty and "trusted.overlay.volatile" xattr
> > on "volatile" dir. I would expect that this will be all cleaned up
> > as soon as that upper/work is used for non-volatile mount.
> >
> >
> 
> Amir pointed out this is incorrect behaviour earlier.
> You should be able to go:
> non-volatile -> volatile
> volatile -> volatile
> 
> But never
> volatile -> non-volatile, since our mechanism is not bulletproof.

Ok, so one needs to manually remove volatile/dirty to be able to
go from volatile to non-volatile.

I am wondering what does this change mean in terms of user visible
behavior. So far, if somebody tried a remount of volatile overlay, it 
will fail. After this change, it will most likely succeed. I am
hoping nobody relies on remount failure of volatile mount and
complain that user visible behavior changed after kernel upgrade.

Thanks
Vivek


  reply	other threads:[~2020-11-25 18:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 10:46 [PATCH v1 0/3] Make overlayfs volatile mounts reusable Sargun Dhillon
2020-11-25 10:46 ` [PATCH v1 1/3] fs: Add s_instance_id field to superblock for unique identification Sargun Dhillon
2020-11-25 10:46 ` [PATCH v1 2/3] overlay: Add the ability to remount volatile directories when safe Sargun Dhillon
2020-11-25 12:49   ` kernel test robot
2020-11-25 13:23   ` kernel test robot
2020-11-25 13:29   ` kernel test robot
2020-11-25 13:58   ` Amir Goldstein
2020-11-25 14:43   ` Vivek Goyal
2020-11-25 15:29     ` Sargun Dhillon
2020-11-25 18:17   ` Vivek Goyal
2020-11-25 18:31     ` Sargun Dhillon
2020-11-25 18:43       ` Vivek Goyal [this message]
2020-11-25 18:47         ` Sargun Dhillon
2020-11-25 18:52           ` Vivek Goyal
2020-11-25 19:37             ` Amir Goldstein
2020-11-25 10:46 ` [PATCH v1 3/3] overlay: Add rudimentary checking of writeback errseq on volatile remount Sargun Dhillon
2020-11-25 14:03   ` Amir Goldstein
2020-11-25 15:36     ` Vivek Goyal
2020-11-25 15:52       ` 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=20201125184305.GE3095@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dwalsh@redhat.com \
    --cc=gscrivan@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=sargun@sargun.me \
    --cc=viro@zeniv.linux.org.uk \
    /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).