On Sun, Dec 22, 2019 at 9:08 AM Amir Goldstein <amir73il@xxxxxxxxx> 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