From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Giuseppe Scrivano <gscrivan@redhat.com>,
Daniel J Walsh <dwalsh@redhat.com>,
Steven Whitehouse <swhiteho@redhat.com>,
Eric Sandeen <sandeen@redhat.com>,
pmatilai@redhat.com
Subject: Re: [RFC PATCH v3] overlayfs: Provide mount options sync=off/fs to skip sync
Date: Mon, 6 Jul 2020 12:06:45 -0400 [thread overview]
Message-ID: <20200706160645.GA3107@redhat.com> (raw)
In-Reply-To: <CAOQ4uxhLe3ptTcdsyGXRB=w3ub5_is3HcUY0z7OLgLPDg1Mk5w@mail.gmail.com>
On Thu, Jul 02, 2020 at 10:26:44AM +0300, Amir Goldstein wrote:
[..]
> If you use bitwise flags, they reflect the ovl_should_xxx queries:
> __OVL_NOSYNC_FILE and __OVL_NOSYNC_FS
> #define OVL_SYNC_FILE(type) (!((type) & __OVL_NOSYNC_FILE))
> #define OVL_SYNC_FS(type) (!((type) & __OVL_NOSYNC_FS))
>
>
> If you use enum (not bitwise), the distinct enum values reflect the
> mount option:
> OVL_SYNC_ON (=0), OVL_SYNC_OFF, OVL_SYNC_FS
>
> I am not commenting on this because of some sort of aesthetic taste.
> I am commenting on this because I think it would make parts of the
> patch simpler/clearer (see below).
>
> As far as I am concerned, for the three possible config values off/fs/on
> the distinct enum values are better.
> Of course, that is *my* opinion. You may disagree.
Hi Amir,
I kept bitwise flags because you had mentioned sync=writeback and this
can co-exist with sync=fs. May be somebody wants sync=copyup down the
line. Though we have not implemented sync=writeback
yet, I thought keeping a bitwise flag will help support multiple sync
options at the same time.
Anyway, sync=off/fs are mutually exclusive and don't need bitwise
flags. So for now I will convert this to just enum. When sombody
introduces a sync option which can co-exist with existing options,
they will need to use bit flags.
[..]
> > + seq_puts(m, ",sync=fs");
>
> option #1 (bitwise):
> if (!ofs->config.sync)
> seq_puts(m, ",sync=off");
> else if (!OVL_SYNC_FILE(ofs->config.sync))
> seq_puts(m, ",sync=fs");
>
> option #2 (distinct):
> Would be better. See ovl_xino_str[].
Will do.
[..]
> > @@ -588,6 +608,17 @@ static int ovl_parse_opt(char *opt, struct ovl_config *config)
> > config->workdir = NULL;
> > }
> >
> > + if (OVL_SYNC_OFF(config->sync) && OVL_SYNC_FS(config->sync)) {
> > + pr_err("conflicting options: sync=off,sync=fs\n");
> > + return -EINVAL;
> > + }
> > +
>
> We are not warning user that metacopy=off conflicts with metacopy=on,
> we just let the last option overwrite previous ones.
Ok, will drop this check.
Thanks
Vivek
prev parent reply other threads:[~2020-07-06 16:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 21:50 [RFC PATCH v3] overlayfs: Provide mount options sync=off/fs to skip sync Vivek Goyal
2020-07-02 7:26 ` Amir Goldstein
2020-07-06 16:06 ` Vivek Goyal [this message]
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=20200706160645.GA3107@redhat.com \
--to=vgoyal@redhat.com \
--cc=amir73il@gmail.com \
--cc=dwalsh@redhat.com \
--cc=gscrivan@redhat.com \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=pmatilai@redhat.com \
--cc=sandeen@redhat.com \
--cc=swhiteho@redhat.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.