From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v2 2/5] ovl: simplify ovl_same_sb() helper
Date: Mon, 13 Jan 2020 12:37:44 +0100 [thread overview]
Message-ID: <CAJfpeguNywFLtpETg1oVpLnjkMP=DPZU3Fjvvb9aumRvTXBwtw@mail.gmail.com> (raw)
In-Reply-To: <20191222080759.32035-3-amir73il@gmail.com>
On Sun, Dec 22, 2019 at 9:08 AM Amir Goldstein <amir73il@gmail.com> wrote:
>
> No code uses the sb returned from this helper, so make it retrun
> a boolean and rename it to ovl_same_fs().
>
> The xino mode is irrelevant when all layers are on same fs, so
> instead of describing samefs with mode OVL_XINO_OFF, use a new mode
> OVL_XINO_SAME_FS, which is different than the case of non-samefs
> with xino=off.
>
> Create a new helper ovl_same_dev(), to use instead of the common check
> for (ovl_same_fs() || xinobits).
What about OVL_XINO_AUTO: in this case xinobits would be zero but
ovl_same_dev() would return true, no?
More comments inline.
> @@ -358,7 +352,8 @@ static int ovl_show_options(struct seq_file *m, struct dentry *dentry)
> if (ofs->config.nfs_export != ovl_nfs_export_def)
> seq_printf(m, ",nfs_export=%s", ofs->config.nfs_export ?
> "on" : "off");
> - if (ofs->config.xino != ovl_xino_def())
> + if (ofs->config.xino != ovl_xino_def() &&
> + ofs->config.xino != OVL_XINO_SAME_FS)
I'm not sure I like this, although it doesn't contradict the policy of
repeatability of mounts. Could we instead have a separate
ofs->xino_state, that defaults to config.xino but can take the value
of OVL_XINO_SAME_FS?
Thanks,
Miklos
next prev parent reply other threads:[~2020-01-13 11:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 8:07 [PATCH v2 0/5] Sort out overlay layers and fs arrays Amir Goldstein
2019-12-22 8:07 ` [PATCH v2 1/5] ovl: generalize the lower_layers[] array Amir Goldstein
2020-01-13 10:05 ` Miklos Szeredi
2020-01-13 14:03 ` Amir Goldstein
2019-12-22 8:07 ` [PATCH v2 2/5] ovl: simplify ovl_same_sb() helper Amir Goldstein
2020-01-13 11:37 ` Miklos Szeredi [this message]
2020-01-13 14:31 ` Amir Goldstein
2020-01-13 14:38 ` Miklos Szeredi
2019-12-22 8:07 ` [PATCH v2 3/5] ovl: generalize the lower_fs[] array Amir Goldstein
2020-01-13 14:30 ` Miklos Szeredi
2020-01-13 14:35 ` Amir Goldstein
2020-01-14 20:58 ` Amir Goldstein
2019-12-22 8:07 ` [PATCH v2 4/5] ovl: fix corner case of conflicting lower layer uuid Amir Goldstein
2019-12-22 8:07 ` [PATCH v2 5/5] ovl: fix corner case of non-constant st_dev;st_ino 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='CAJfpeguNywFLtpETg1oVpLnjkMP=DPZU3Fjvvb9aumRvTXBwtw@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=amir73il@gmail.com \
--cc=linux-unionfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).