From: Vivek Goyal <vgoyal@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Amir Goldstein <amir73il@gmail.com>,
overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v2] ovl: return error on mount if metacopy cannot be enabled
Date: Wed, 31 Oct 2018 10:05:41 -0400 [thread overview]
Message-ID: <20181031140541.GA22810@redhat.com> (raw)
In-Reply-To: <CAJfpegux1jxgFbDhxsE_+u9_L_JgohFkf7K8in-p+B187iDJdQ@mail.gmail.com>
On Wed, Oct 31, 2018 at 01:35:38PM +0100, Miklos Szeredi wrote:
> On Wed, Oct 31, 2018 at 1:26 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> > On Wed, Oct 31, 2018 at 2:19 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> > My 'strict' patch did not try to deal with implicitly enabling redirect_dir
> > Vivek posted a different patch to deal with that.
>
> What I mean, is that sections of your patch dealing with the
> redirect_dir conflict and sections of Vivek's patch dealing with
> _enforce are completely unnecessary if we just define the rules of
> implicit enable/disable between metacopy and redirect_dir.
>
> >> config->redirect_mode = match_strdup(&args[0]);
> >> if (!config->redirect_mode)
> >> return -ENOMEM;
> >> +
> >> + /* "redirect_dir=off" implies "metacopy=off" */
> >> + if (strcmp(config->redirect_mode, "off") == 0 ||
> >> + strcmp(config->redirect_mode, "nofollow") == 0)
> >> + config->metacopy = false;
> >
> > This look completely counter to the 'strict' behavior definition.
> > If user specified metacopy=on, we are not allowed to end up with metacopy=off.
>
> What about "metacopy=on,metacopy=off"?
I would think that ordering will matter. metacopy=off will override,
metacopy=on (because its later in the order).
>
> What I'm saying is that "metacopy=on,redirect_dir=off" should be
> exactly equivalent to the above, if taking the implicit disable rule
> into account.
I am wondering why do we have to accept nonsense options possibilities.
Why not simply reject them with -EINVAL. IMHO, that behavior is much
simpler to deal with than implicitly disabling metacopy because
redirect_dir=off.
If some options don't make sense together, then it makes sense to return
error and let user understand it and fix it.
Thanks
Vivek
next prev parent reply other threads:[~2018-10-31 14:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 11:10 [PATCH v2] ovl: return error on mount if metacopy cannot be enabled Amir Goldstein
2018-10-31 11:48 ` Miklos Szeredi
2018-10-31 12:19 ` Miklos Szeredi
2018-10-31 12:26 ` Amir Goldstein
2018-10-31 12:35 ` Miklos Szeredi
2018-10-31 12:37 ` Miklos Szeredi
2018-10-31 13:42 ` Amir Goldstein
2018-10-31 14:05 ` Vivek Goyal [this message]
2018-10-31 13:29 ` Amir Goldstein
2018-10-31 13:47 ` Vivek Goyal
2018-10-31 14:05 ` Amir Goldstein
2018-10-31 14:17 ` Vivek Goyal
2018-10-31 15:31 ` Amir Goldstein
2018-10-31 15:39 ` Vivek Goyal
2018-10-31 16:04 ` Amir Goldstein
2018-10-31 16:39 ` Vivek Goyal
2018-10-31 18:37 ` Amir Goldstein
2018-10-31 19:23 ` Vivek Goyal
2018-10-31 19:56 ` Vivek Goyal
2018-10-31 20:24 ` Amir Goldstein
2018-10-31 21:24 ` Vivek Goyal
2018-10-31 22:16 ` 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=20181031140541.GA22810@redhat.com \
--to=vgoyal@redhat.com \
--cc=amir73il@gmail.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