Re: [PATCH 2/2] Configure custom layers via environment variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux