Re: [PATCH v3 2/3] ovl: port to new mount api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 16, 2023 at 4:28 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> On Fri, Jun 16, 2023 at 04:21:29PM +0300, Amir Goldstein wrote:
> > On Tue, Jun 13, 2023 at 5:49 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
> > >
> > > We recently ported util-linux to the new mount api. Now the mount(8)
> > > tool will by default use the new mount api. While trying hard to fall
> > > back to the old mount api gracefully there are still cases where we run
> > > into issues that are difficult to handle nicely.
> > >
> > > Now with mount(8) and libmount supporting the new mount api I expect an
> > > increase in the number of bug reports and issues we're going to see with
> > > filesystems that don't yet support the new mount api. So it's time we
> > > rectify this.
> > >
> > > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
> > > ---
> > >  fs/overlayfs/ovl_entry.h |   2 +-
> > >  fs/overlayfs/super.c     | 557 ++++++++++++++++++++++++++---------------------
> > >  2 files changed, 305 insertions(+), 254 deletions(-)
> > >
> > > diff --git a/fs/overlayfs/ovl_entry.h b/fs/overlayfs/ovl_entry.h
> > > index e5207c4bf5b8..c72433c06006 100644
> > > --- a/fs/overlayfs/ovl_entry.h
> > > +++ b/fs/overlayfs/ovl_entry.h
> > > @@ -12,7 +12,7 @@ struct ovl_config {
> > >         bool default_permissions;
> > >         bool redirect_dir;
> > >         bool redirect_follow;
> > > -       const char *redirect_mode;
> > > +       unsigned redirect_mode;
> >
> > I have a separate patch to get rid of redirect_dir and redirect_follow
> > leaving only redirect_mode enum.
> >
> > I've already rebased your patches over this change in my branch.
> >
> > https://github.com/amir73il/linux/commits/fs-overlayfs-mount_api
> >
> >
> > >         bool index;
> > >         bool uuid;
> > >         bool nfs_export;
> > > diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
> > > index d9be5d318e1b..3392dc5d2082 100644
> > > --- a/fs/overlayfs/super.c
> > > +++ b/fs/overlayfs/super.c
> > > @@ -16,6 +16,8 @@
> > >  #include <linux/posix_acl_xattr.h>
> > >  #include <linux/exportfs.h>
> > >  #include <linux/file.h>
> > > +#include <linux/fs_context.h>
> > > +#include <linux/fs_parser.h>
> > >  #include "overlayfs.h"
> > >
> > >  MODULE_AUTHOR("Miklos Szeredi <miklos@xxxxxxxxxx>");
> > > @@ -59,6 +61,79 @@ module_param_named(metacopy, ovl_metacopy_def, bool, 0644);
> > >  MODULE_PARM_DESC(metacopy,
> > >                  "Default to on or off for the metadata only copy up feature");
> > >
> > > +enum {
> > > +       Opt_lowerdir,
> > > +       Opt_upperdir,
> > > +       Opt_workdir,
> > > +       Opt_default_permissions,
> > > +       Opt_redirect_dir,
> > > +       Opt_index,
> > > +       Opt_uuid,
> > > +       Opt_nfs_export,
> > > +       Opt_userxattr,
> > > +       Opt_xino,
> > > +       Opt_metacopy,
> > > +       Opt_volatile,
> > > +};
> >
> > Renaming all those enums to lower case creates unneeded churn.
> > I undid that in my branch, so now the mount api porting patch is a
> > lot smaller.
>
> Every single filesystem apart from fuse and overlayfs uses the standard
> "Opt_" syntax. Only fuse and overlayfs use OPT_* all uppercase. Even the
> documenation uses Opt_* throughout.
>
> So I'd appreciate it if you please did not go out of your way to deviate
> from this. I already did the work to convert to the Opt_* format on
> purpose. If you want less churn however, then you can ofc move this to a
> preparatory patch that converts to the standard format.

okay.
as long as the logical changes are separate from the renaming.

Thanks,
Amir.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux