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: Wed, 15 Apr 2020 15:42:43 -0400	[thread overview]
Message-ID: <20200415194243.GE239514@redhat.com> (raw)
In-Reply-To: <CAOQ4uxhmxxjGGB3bBoK1OmcAWDsoNi3WdORtH7WDLOcp8=sYSQ@mail.gmail.com>

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.

> 
> >
> > 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.

Ok.

> 
> 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?

No, I don't have any requirements yet. Just thought that providing
extra flexibility will be good. At the same time I understand that
tests are tied to specific config, hence mount options. If we allow
override, suddenly many tests will start failing.

> 
> >
> > 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.

Yes. Thanks.

Vivek

> 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 19:42 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 [this message]
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=20200415194243.GE239514@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).