All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	"zhangyi (F)" <yi.zhang@huawei.com>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
	fstests <fstests@vger.kernel.org>, Eryu Guan <eguan@redhat.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Miao Xie <miaoxie@huawei.com>
Subject: Re: [PATCH v2 01/18] overlay: implement fsck utility
Date: Thu, 14 Dec 2017 11:12:04 -0500	[thread overview]
Message-ID: <20171214161204.GB7375@redhat.com> (raw)
In-Reply-To: <CAOQ4uxhGpjn2U2Do-x_Rbb48puXRg=GuUn2vh8q+tF2diTb=_w@mail.gmail.com>

On Thu, Dec 14, 2017 at 05:43:00PM +0200, Amir Goldstein wrote:
> On Thu, Dec 14, 2017 at 5:21 PM, Vivek Goyal <vgoyal@redhat.com> wrote:
> > On Thu, Dec 14, 2017 at 04:33:21PM +0200, Amir Goldstein wrote:
> ...
> >> Other fsck do not have this problem.
> >> They only need blockdev as input.
> >> Which leads me to an idea I have been wondering about for the overlayfs
> >> utilities - a specification file, e.g.:
> >>
> >> # create dirs and write their path to a spec file:
> >> mkfs.overlay -ometacopy=on,lowerdir=... myovl.spec
> >> # mount overlay using mount.overlay helper:
> >> mount -t overlay myovl.spec /ovl
> >> # fsck with just one configuration that is consistent with mkfs and mount:
> >> fsck.overlay -n myovl.spec
> >>
> >> The specification file can also determine the backward incompatible
> >> features of the overlay, for example, if user sets -metacopy=on during mkfs
> >> mount.overlay helper will refuse to mount with kernel that does not
> >> support metacopy. The reason we CAN do that with spec file is because spec
> >> file determines that overlay was born with metacopy feature enabled.
> >> It is not the same an overlay that was once mounted with metacopy=on and
> >> then we don't allow it to mount with an old kernel.
> >
> > So why not store this information in an xattr on upper/ (instead of spec
> > file) and then overlay specific helpers could parse it do same thing. I
> 
> Maybe.
> 
> > mean otherwise user space has to worry about storing and finding out
> > right foo.ovl.spec file for any mount/unmount or other operations. From
> > a user's perspective, I would be glad if I don't have to worry about
> > managing another spec file per overlay mount.
> >
> 
> That's one way of looking at it, another way to look at it would be now
> user  doesn't need to worry 3 directories but just one file. Anyway the
> spec file is meant to be an abstraction layer, not a replacement for
> using existing mount options.

User still need to worry about 3 (or more) directories for spec file
creation. And for furture mounts/remount spec file can be used. Not
sure how it will work with changing spec file etc.

> 
> > This will only work if kernel is old but tools are still new. Not sure
> > how many a times people run with this configuraiotion.
> >
> 
> The major benefit of starting fresh with user tools and spec file is that we
> can start by checking features compatibility from day 1.
> You can think of a spec file as a declaration from admin that this overlay
> is never going to be mounted on a kernel that doesn't support the spec
> file required features.

> It's fine if the "file" end up being stored in "features" or "spec" xattr on
> upper dir. That is an implementation detail and we can actually make
> this a user choice and user tools can both accept a spec file as input
> or look for the xattr in upper dir.

Ok. I personally like the idea of storing required info in an xattr in upper
and not having to worry about managing spec file for overlay mount. But that's
just me. :-)

Vivek

  reply	other threads:[~2017-12-14 16:12 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14  6:47 [PATCH v2 00/18] overlay: implement fsck.overlay utility zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 01/18] overlay: implement fsck utility zhangyi (F)
2017-12-14 14:13   ` Miklos Szeredi
2017-12-14 14:33     ` Amir Goldstein
2017-12-14 14:47       ` Miklos Szeredi
2017-12-14 15:03         ` Amir Goldstein
2017-12-14 15:10           ` Miklos Szeredi
2017-12-14 15:18             ` Amir Goldstein
2017-12-14 15:48               ` Miklos Szeredi
2017-12-14 16:03                 ` Vivek Goyal
2017-12-14 16:29                 ` Amir Goldstein
2017-12-15 14:18                   ` Miklos Szeredi
2017-12-15 14:44                     ` Amir Goldstein
2017-12-15 16:06                       ` Miklos Szeredi
2017-12-15 16:14                         ` Miklos Szeredi
2017-12-15 15:16                     ` Vivek Goyal
2017-12-15 16:17                       ` Miklos Szeredi
2017-12-14 15:21       ` Vivek Goyal
2017-12-14 15:43         ` Amir Goldstein
2017-12-14 16:12           ` Vivek Goyal [this message]
2017-12-15  4:18       ` zhangyi (F)
2017-12-15  3:35     ` zhangyi (F)
2017-12-15  7:45       ` Amir Goldstein
2017-12-15  9:13         ` zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 02/18] fsck.overlay: fix uninitialized variable zhangyi (F)
2017-12-14  9:15   ` Amir Goldstein
2017-12-14  6:47 ` [PATCH v2 03/18] fsck.overlay: add -n -p and -y options zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 04/18] fsck.overlay: add path package and split helper zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 05/18] fsck.overlay: convert path parse to use helper function zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 06/18] fsck.overlay: open lowerdirs in advance zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 07/18] fsck.overlay: check lowers use relative path zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 08/18] fsck.overlay: fix spelling mistakes zhangyi (F)
2017-12-14  9:13   ` Amir Goldstein
2017-12-14  6:47 ` [PATCH v2 09/18] fsck.overlay: add counter of checked objects zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 10/18] fsck.overlay: fix verbose flag zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 11/18] fsck.overlay: add ovl_ask_invalid helper zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 12/18] fsck.overlay: remove duplicate redirect xattr in yes mode zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 13/18] fsck.overlay: handle missing case of redirecte directory zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 14/18] fsck.overlay: correct copyright and License zhangyi (F)
2017-12-14  9:09   ` Amir Goldstein
2017-12-14  6:47 ` [PATCH v2 15/18] fsck.overlay: fix word mistake zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 16/18] fsck.overlay: remove test cases zhangyi (F)
2017-12-14  9:11   ` Amir Goldstein
2017-12-14  6:47 ` [PATCH v2 17/18] fsck.overlay: not enforce overlayfs is offline in 'no changes' mode zhangyi (F)
2017-12-14  6:47 ` [PATCH v2 18/18] fsck.overlay: use relative path when checking lowers zhangyi (F)
2017-12-14  9:27 ` [PATCH v2 00/18] overlay: implement fsck.overlay utility Amir Goldstein
2017-12-14 10:43   ` zhangyi (F)

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=20171214161204.GB7375@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    --cc=miklos@szeredi.hu \
    --cc=yi.zhang@huawei.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.