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: Giuseppe Scrivano <gscrivan@redhat.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] Configure custom layers via environment variables
Date: Thu, 16 Apr 2020 08:58:07 -0400	[thread overview]
Message-ID: <20200416125807.GB276932@redhat.com> (raw)
In-Reply-To: <CAOQ4uxjZ4Yd3ZWi+Fe64fVkrD=XMDjF1=C=XN_PNdywbGx_gzQ@mail.gmail.com>

On Thu, Apr 16, 2020 at 10:10:35AM +0300, Amir Goldstein wrote:
> On Wed, Apr 15, 2020 at 10:42 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > On Wed, Apr 15, 2020 at 07:27:43PM +0300, Amir Goldstein wrote:
> > > On Wed, Apr 15, 2020 at 6:30 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> > > >
> > > > On Wed, Apr 15, 2020 at 03:01:34PM +0300, Amir Goldstein wrote:
> > > > > The following environment variables are supported:
> > > > >
> > > > >  UNIONMOUNT_BASEDIR  - base dir for --samefs (default: /base)
> > > > >  UNIONMOUNT_UPPERDIR - upper layer root path (default: /upper)
> > > > >  UNIONMOUNT_LOWERDIR - lower layer root path (default: /lower)
> > > > >  UNIONMOUNT_MNTPOINT - mount point for tests (default: /mnt)
> > > > >
> > > > > User provided paths for base/lower/upper should point at a pre-mounted
> > > > > filesystem, whereas tmpfs instances will be created on default paths.
> > > > >
> > > > > This is going to be used for running unionmount tests from xfstests.
> > > >
> > > > Hi Amir,
> > > >
> > > > I don't understand this testsuite code. So I will ask.
> > > >
> > > > What's base dir?
> > >
> > > Before these changes, with option --samefs, tmpfs is mounted
> > > at /base, overlay lowerdir is /base/lower and upperdir is /base/upper.
> > > After these changes, /base can be substituted with any pre mounted
> > > filesystem path.
> >
> > If I can specify lower and upper root, then why do I need to specify
> > base directory. User can put lower, upper either on samefs or different
> > fs as need be.
> >
> > IOW, either I need to specify base dir, so that lower and upper can
> > be setup by testsuite automatically. Or I need to specify lower and
> > upper and then base should not matter.
> >
> > What am I missing.
> >
> 
> Not much, as it stands, with option --samefs, UNIONMOUNT_BASEDIR
> is used and without --samefs UNIONMOUNT_LOWERDIR and
> UNIONMOUNT_UPPERDIR used instead.
> 
> I agree that this a bit lame and non intuitive way to configure.
> The reason for explicit --samefs option (vs. providing upper and lower
> root from same fs) is, again, for the test sanity checks which differ
> for is_samefs() case.
> 
> I think what I will do is I will get rid of UNIONMOUNT_UPPERDIR
> because this name is a bit confusing. It is not the overlay upperdir,
> it is the grandfather of upperdir/workdir. So I might as well call
> this config UNIONMOUNT_BASEDIR and use it also as the parent
> of lowerdir in --samefs tests.

How about calling upper/work root as UNIONMOUNT_UPPER_WORK_ROOT instead.
That's more intuitive as oppsed to BASEDIR. But I understand that due 
to legacy reasons there must be many other assumptions in the code so
it might not be trivial.

What will help though, that document these options well, so that
those who don't read the code and still understand use different
config options.

> 
> The config UNIONMOUNT_LOWERDIR will remain, but it will only
> be relevant to tests without --samefs.
> 
> IOW, you won't need the fstab bind mount trick and you won't need
> to use the magic suffix "lower_layer" anymore. You could set:
>   UNIONMOUNT_BASEDIR=/mnt/virtiofs
> 
> to run --ov --samefs --verify tests.

If I specify UNIONMOUNT_BASEDIR, then --samefs should be implied?

Thanks
Vivek

> 
> If you want to run test with virtio fs as upper (single or multi layers)
> and lower as another fs, you could additionally set:
>   UNIONMOUNT_LOWERDIR=/mnt/anotherfs
> 
> and run --ov --verify tests.
> 
> Thanks for the feedback!
> Amir.
> 


  reply	other threads:[~2020-04-16 12:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 12:01 [PATCH 0/2] Prepare for running unionmount testssuite from Amir Goldstein
2020-04-15 12:01 ` [PATCH 1/2] Stop using bind mounts for --samefs Amir Goldstein
2020-04-15 12:01 ` [PATCH 2/2] Configure custom layers via environment variables Amir Goldstein
2020-04-15 15:30   ` Vivek Goyal
2020-04-15 16:27     ` Amir Goldstein
2020-04-15 19:42       ` Vivek Goyal
2020-04-16  7:10         ` Amir Goldstein
2020-04-16 12:58           ` Vivek Goyal [this message]
2020-04-16 13:49             ` Amir Goldstein
2020-04-18  9:57               ` Amir Goldstein
2020-04-20 19:14                 ` Vivek Goyal
2020-04-21  5:57                   ` Amir Goldstein
2020-05-17  8:45                     ` Amir Goldstein
2020-05-22 14:36                       ` Vivek Goyal
2020-05-22 17:19                         ` Amir Goldstein
2020-05-24 10:28                           ` Amir Goldstein
2020-05-26 12:54                             ` Vivek Goyal

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=20200416125807.GB276932@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=gscrivan@redhat.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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).