All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Matt Coffin <mcoffin13@gmail.com>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: [PATCH v2] overlay: allow config override of metacopy/redirect defaults
Date: Mon, 10 Jun 2019 14:30:53 -0400	[thread overview]
Message-ID: <20190610183053.GA29869@redhat.com> (raw)
In-Reply-To: <CAOQ4uximPqsNivkqD36LdNfT4g41v2rtDm+OB6t2z40dpWs_og@mail.gmail.com>

On Sat, Jun 08, 2019 at 12:04:54PM +0300, Amir Goldstein wrote:
> Hi Matt,
> 
> Thank you for trying to address this, but I see problems both in Why and
> How you did it.
> 
> On Fri, Jun 7, 2019 at 11:51 PM Matt Coffin <mcoffin13@gmail.com> wrote:
> >
> > [Why]
> > Currently, if the redirect_dir option is set as a kernel or module
> > parameter, then even if metacopy is only enabled config, then both
> > metacopy and redirect_dir will be enabled when one creates a mount
> > point. This is not desirable because /sys/module/overlay/parameters will
> > still report that redirect_dir is not enabled
> 
> /sys/module/overlay/parameters reports that redirect_dir is not enabled
> *by default* not per mount.
> 
> > and there will be no redirect_dir=on line in the mount options in /proc/mounts.
> 
> That is a bug. This code:
> /* Automatically enable redirect otherwise. */
> config->redirect_follow = config->redirect_dir = true;
> 
> Needs to update of config->redirect_mode.

Hi Amir,

It took me a while to understand what's the problem. So IIUC, issue is
that kernel has enabled redirect_dir by default. But it was disabled
using module parameter. But it was enabled again as a side affect because
metacopy=on was passed as mount option. And /proc/self/mountinfo does
not show redirect_dir=on and hence the confusion.

IIRC, once you mentioned that we only show those options which needs
to be specified if same mount has to be reproduced on different machine
with same kernel/module options. If yes, then setting
config->redirect_dir=on is not needed because passing metacopy=on will
ensure that.

To me problem is that sometimes I want to know what options are enabled
on a particular mount. And in this case user can't figure that out by
parsing /proc/self/mountinfo.

And that's the reason apps create a overlay mount point, do bunch of
file operations and analyze xattrs to figure out what options are enabled.

It will be nice if there was an interface to query all that. And if there
is one, then this should go in there.

Otherwise given the current interface, it does not sound like a bug to
me. Current interface does not tell you what all features are enabled.
It only tells you what you need to provide as mount option to create
similar mount point.

Thanks
Vivek

  parent reply	other threads:[~2019-06-10 18:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07  1:04 [PATCH] overlay: allow config override of metacopy/redirect defaults Matt Coffin
2019-06-07 20:51 ` [PATCH v2] " Matt Coffin
2019-06-08  9:04   ` Amir Goldstein
2019-06-08 17:28     ` Matt Coffin
2019-06-08 18:47       ` Amir Goldstein
2019-06-09 19:14         ` Miklos Szeredi
2019-06-10 18:40           ` Vivek Goyal
2019-06-10 18:45             ` Vivek Goyal
2019-06-11 12:37               ` Miklos Szeredi
2019-06-11 13:09                 ` Vivek Goyal
2019-06-11 21:44                   ` Daniel Walsh
2019-06-11 21:49                     ` Vivek Goyal
2019-06-11 21:57                       ` Matt Coffin
2019-06-11 23:09                         ` Daniel Walsh
2019-06-12 12:32                         ` Vivek Goyal
2019-06-10 18:30     ` Vivek Goyal [this message]
2019-06-10 18:51       ` Amir Goldstein

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=20190610183053.GA29869@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=mcoffin13@gmail.com \
    --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 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.