Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662558 > unrolled thread

Re: [PATCH] VFS: Differentiate mount flags (MS_*) from internal superblock flags

Started byJeff Layton <jlayton@redhat.com>
First post2017-06-09 17:40 +0200
Last post2017-06-09 18:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] VFS: Differentiate mount flags (MS_*) from internal  superblock flags Jeff Layton <jlayton@redhat.com> - 2017-06-09 17:40 +0200
    Re: [PATCH] VFS: Differentiate mount flags (MS_*) from internal superblock flags David Howells <dhowells@redhat.com> - 2017-06-09 18:10 +0200

#1662558 — Re: [PATCH] VFS: Differentiate mount flags (MS_*) from internal superblock flags

FromJeff Layton <jlayton@redhat.com>
Date2017-06-09 17:40 +0200
SubjectRe: [PATCH] VFS: Differentiate mount flags (MS_*) from internal superblock flags
Message-ID<tQub0-3k4-15@gated-at.bofh.it>
On Fri, 2017-06-09 at 16:01 +0100, David Howells wrote:
> Differentiate the MS_* flags passed to mount(2) from the internal flags set
> in the super_block's s_flags.  s_flags are now called SB_*, with the names
> and the values for the moment mirroring the MS_* flags that they're
> equivalent to.
> 
> Note that this shows up some interesting issues:
> 
>  (1) Some MS_* flags get translated to MNT_* flags (such as MS_NODEV ->
>      MNT_NODEV) without passing this on to the filesystem, but some
>      filesystems set such flags anyway.
> 

I guess you mean stuff like affs_fill_super which does:

    sb->s_flags |= MS_NODEV | MS_NOSUID;

It seems like it's doing that too late to be useful.

That probably just reflects the fact that it's not very clear how to use
those flags. Probably the right thing is to go over them one by one and
clean up their usage.

> (2) The ->remount_fs() methods of some filesystems adjust the *flags
>      argument by setting MS_* flags in it, such as MS_NOATIME - but these
>      flags are then scrubbed by do_remount_sb() (only the occupants of
>      MS_RMT_MASK are permitted: MS_RDONLY, MS_SYNCHRONOUS, MS_MANDLOCK,
>      MS_I_VERSION and MS_LAZYTIME)
> 
> I'm not sure what's the best way to solve all these cases.
> 

...not sure on this one either.

This is a big patch, but I like this. It seems like a good conceptual
change to separate the external mount() API flags from the internal
implementation. That allows us to make changes to the internal flag
representation in the future without affecting the external API.

Acked-by: Jeff Layton <jlayton@redhat.com>

[toc] | [next] | [standalone]


#1662583 — Re: [PATCH] VFS: Differentiate mount flags (MS_*) from internal superblock flags

FromDavid Howells <dhowells@redhat.com>
Date2017-06-09 18:10 +0200
SubjectRe: [PATCH] VFS: Differentiate mount flags (MS_*) from internal superblock flags
Message-ID<tQuE2-3IK-21@gated-at.bofh.it>
In reply to#1662558
Jeff Layton <jlayton@redhat.com> wrote:

> I guess you mean stuff like affs_fill_super which does:
> 
>     sb->s_flags |= MS_NODEV | MS_NOSUID;
> 
> It seems like it's doing that too late to be useful.

Actually, after the change, it seems nothing actually tests SB_NOSUID,
SB_NODEV or SB_NOEXEC, so those bits should probably be removed.

I also wonder if the internal MS_ flags (eg. MS_SUBMOUNT) should be removed
from the UAPI header.

David

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web