All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Vivek Goyal <vgoyal@redhat.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 10:10:35 +0300	[thread overview]
Message-ID: <CAOQ4uxjZ4Yd3ZWi+Fe64fVkrD=XMDjF1=C=XN_PNdywbGx_gzQ@mail.gmail.com> (raw)
In-Reply-To: <20200415194243.GE239514@redhat.com>

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.

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 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  7:10 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 [this message]
2020-04-16 12:58           ` Vivek Goyal
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='CAOQ4uxjZ4Yd3ZWi+Fe64fVkrD=XMDjF1=C=XN_PNdywbGx_gzQ@mail.gmail.com' \
    --to=amir73il@gmail.com \
    --cc=gscrivan@redhat.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=vgoyal@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.