From: David Howells <dhowells@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: dhowells@redhat.com, mszeredi@redhat.com, jlayton@redhat.com,
linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 00/23] VFS: Introduce superblock configuration context [ver #4]
Date: Tue, 30 May 2017 16:36:14 +0100 [thread overview]
Message-ID: <15403.1496158574@warthog.procyon.org.uk> (raw)
In-Reply-To: <20170530145043.GG6365@ZenIV.linux.org.uk>
Al Viro <viro@ZenIV.linux.org.uk> wrote:
> Random notes:
> * "sb_config" looks rather odd in the current variant; mount_context,
> perhaps? Or fs_context, for that matter... Anyway, that's trivial.
You can argue that one with Miklós. He argued against mount_context as I had
it originally. His point is that the same struct may be used when
reconfiguring an sb - which isn't exactly a mount operation (even though we do
it that day today with remount).
> * if NFS folks want to play with EXPORT_SYMBOL_GPL, fine, but any
> EXPORT_SYMBOL_GPL in vfs proper is a mistake. If it's an interface that
> makes sense, just export it; if it's a vewwwy, vewwwy pwiwate interface
> for some specific module - let's figure out how to deal with that layering
> violation rather than exporting it at all.
I agree, but apparently not everyone does. There are _GPL symbols in the core
VFS that I need to replace.
> * what the hell is ms_flags thing doing in __vfs_new_sb_config()?
> It's a really vile mix of unrelated flags and operations we had in existing
> mount(2) ABI. With MS_KERNMOUNT thrown into that loo^Wmix. Sure, we need
> to parse the garbage fed to mount(2). And we need to pass that garbage to
> "legacy" types as well, but let's not inflict it upon the new mechanisms.
I know, but we might get it from mount(2). I can tamp down the flag mask and
translate it from MS_*, but the MS_* flags are also stored in the superblock
(->s_flags).
I've removed the MNT_* flags from there already.
> * what's wrong with simple_pin_fs() as it is? You keep
> vfs_kern_mount() anyway, so...
I would like to replace vfs_kern_mount() and vfs_submount(), with the _sc
versions but the users would need converting first. It might make sense to
retain an __init variant of the former though.
> * vfs_new_sb_config(): please, move dealing with name into the caller.
> Then you would be able to use it more than once.
Technically, it's used twice, but okay. I guess I should just rename
__vfs_new_sb_config() to vfs_new_sb_config() and add the extra parameters to
the caller.
> * submount side of that thing: do we ever want a type different from
> that of src_sb,
Hmmm... Good question. For the moment I've assumed not. I've killed off the
NFS special types since I can now carry the information in the sb_config
struct that they previously conveyed.
> and how the fuck would methods know what to do with it?
Until I have an example, it's hard to say.
> * remounts: where (if anywhere) do you call ->validate() for those,
It got moved out of the path that revalidate was invoking. I need to put it
back.
However, it may be worth leaving this to the filesystem to invoke during
->get_tree() and ->remount_fs() as it then has access to the on-disk fs
metadata if a blockdev is being used, against which it may need to do
validation.
The biggest advantage of having a separate call is that the argument
combination can be validated before taking any locks, opening a blockdev or
sending packets on the network.
> and if you do not, WTF is this
> + if (cfg->sc.purpose == SB_CONFIG_FOR_REMOUNT)
> + return 0;
> for? You know, the only place that ever looks at ->purpose...
That being the only place is true at the moment, but may not remain so as more
filesystems are converted.
> * docs need to be brought in sync with code - 'purpose' is called 'mount_type'
> in those, which is especially unpleasant since you do introduce a field called just
> that - NFS-only and in NFS-private part.
Yep.
> * you don't need to register filesystem to use kern_mount()
Hmmm... I'm not sure whether that's actually a problem.
> * locking inode in fsmount(2). What for?
Yeah, I can get rid of that. The superblock-getting bit used to be done after
this point, so the lock was necessary to prevent a race.
> * ->sb_mountpoint(). YALinuxSadoMasochismHook. Not called on normal
> mount(2) pathway. Yuck...
That replaces security_sb_kern_mount(). That should move into
do_new_mount_sc().
> * could you split whitespace parts off? Minor, but...
You mean patch 2? You could just take that one patch and apply it/pass it to
Linus, then I could rebase.
> * I'd like to see ipc/mqueue.c dealt with as well; feels like procfs
> counterpart might have too much open-coded. This would show what might be
> folded into saner helpers...
Okay. Any other file system types you'd like to see done immediately?
cpuset, maybe?
I still have to finish the ext4 conversion too.
David
next prev parent reply other threads:[~2017-05-30 15:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 15:50 [RFC][PATCH 00/23] VFS: Introduce superblock configuration context [ver #4] David Howells
2017-05-22 15:51 ` [PATCH 01/23] Provide a function to create a NUL-terminated string from unterminated data " David Howells
2017-05-22 15:51 ` [PATCH 02/23] VFS: Clean up whitespace in fs/namespace.c " David Howells
2017-05-22 15:51 ` [PATCH 03/23] VFS: Make get_mnt_ns() return the namespace " David Howells
2017-05-22 15:52 ` [PATCH 04/23] VFS: Make get_filesystem() return the affected filesystem " David Howells
2017-05-22 15:52 ` [PATCH 05/23] VFS: Provide empty name qstr " David Howells
2017-05-22 15:52 ` [PATCH 06/23] Provide supplementary error message facility " David Howells
2017-05-22 15:52 ` [PATCH 07/23] VFS: Introduce the structs and doc for a superblock configuration context " David Howells
2017-05-22 15:52 ` [PATCH 08/23] VFS: Add LSM hooks for " David Howells
2017-05-22 15:53 ` [PATCH 09/23] VFS: Implement a " David Howells
2017-05-22 15:53 ` [PATCH 10/23] VFS: Remove unused code after superblock config context changes " David Howells
2017-05-22 15:53 ` [PATCH 11/23] VFS: Implement fsopen() to prepare for a mount " David Howells
2017-05-22 15:53 ` [PATCH 12/23] VFS: Implement fsmount() to effect a pre-configured " David Howells
2017-05-22 15:53 ` [PATCH 13/23] VFS: Add a sample program for fsopen/fsmount " David Howells
2017-05-22 15:53 ` [PATCH 14/23] procfs: Move proc_fill_super() to fs/proc/root.c " David Howells
2017-05-22 15:53 ` [PATCH 15/23] proc: Add superblock config support to procfs " David Howells
2017-05-22 15:53 ` [PATCH 16/23] NFS: Move sb-configuration bits into their own file " David Howells
2017-05-22 15:54 ` [PATCH 17/23] NFS: Constify mount argument match tables " David Howells
2017-05-22 15:54 ` [PATCH 18/23] NFS: Rename struct nfs_parsed_mount_data to struct nfs_sb_config " David Howells
2017-05-22 15:54 ` [PATCH 19/23] NFS: Split nfs_parse_mount_options() " David Howells
2017-05-22 15:54 ` [PATCH 20/23] NFS: Deindent nfs_sb_config_parse_option() " David Howells
2017-05-22 15:54 ` [PATCH 21/23] NFS: Add a small buffer in nfs_sb_config to avoid string dup " David Howells
2017-05-22 15:54 ` [PATCH 22/23] NFS: Do some tidying of the parsing code " David Howells
2017-05-22 15:54 ` [PATCH 23/23] NFS: Add sb_config support. " David Howells
2017-05-30 14:50 ` [RFC][PATCH 00/23] VFS: Introduce superblock configuration context " Al Viro
2017-05-30 15:36 ` David Howells [this message]
2017-05-31 7:51 ` Miklos Szeredi
2017-06-02 10:14 ` David Howells
2017-06-09 7:48 ` Some filesystems set MNT_* flags in superblock->s_flags David Howells
2017-06-09 8:02 ` Miklos Szeredi
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=15403.1496158574@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=viro@ZenIV.linux.org.uk \
/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).