linux-unionfs.vger.kernel.org archive mirror
 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: Wed, 15 Apr 2020 19:27:43 +0300	[thread overview]
Message-ID: <CAOQ4uxhmxxjGGB3bBoK1OmcAWDsoNi3WdORtH7WDLOcp8=sYSQ@mail.gmail.com> (raw)
In-Reply-To: <20200415153032.GC239514@redhat.com>

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.

>
> So these options will allow me to specify lower directory, upper directory

Almost.

They let you specify lower fs root and upper fs root.
Before these changes, tmpfs is mounted at /lower and this is used
as overlay lowerdir.
After these changes, /lower can be substituted with any pre mounted
filesystem path.

Situation for upperdir/workdir is a bit different (see below).

> and overlay mount point. User can specify these and testsuite will
> mount overlay accordingly?
>
> What about overlay mount options. Should there be one option for that too.

Maybe. Currently the overlay mount options are determined by the various
command line arguments, like --xino --meta --verify.
The reason that testsuite does not let you use any combination of mount
options is because the options (e.g. --meta) determine both how overlay is
mounted and also how verification is done (see for example the is_metacopy
case in check_copy_up()).

Do you have any requirement for specific overlay mount options you
would like to test?

>
> Assuming workdir is automatically determined.
>

Yes. Before these changes, tmpfs is mounted at /upper.
The directories /upper/0/u /upper/0/w are used as upperdir/workdir with
single layer.
With multiple layers (e.g. ov=2) more directories can be created, like
/upper/1/{u,w}.
After these changes, tmpfs /upper can be substituted with any pre
mounted filesystem path.

Hope this is clear now.
See example is how xfstests make use of those variable to use
the test and scratch partitions for lower and upper fs:
https://github.com/amir73il/xfstests/commit/a36f476a04c5af5100141c3ff9938d0c2f93018d#diff-7892ac2dd3f989038dfaa2e708ab12e2R386

Thanks,
Amir.

  reply	other threads:[~2020-04-15 16:28 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 [this message]
2020-04-15 19:42       ` Vivek Goyal
2020-04-16  7:10         ` Amir Goldstein
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='CAOQ4uxhmxxjGGB3bBoK1OmcAWDsoNi3WdORtH7WDLOcp8=sYSQ@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 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).