From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: 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 15:50:43 +0100 [thread overview]
Message-ID: <20170530145043.GG6365@ZenIV.linux.org.uk> (raw)
In-Reply-To: <149546825563.9289.9065118651584207610.stgit@warthog.procyon.org.uk>
On Mon, May 22, 2017 at 04:50:56PM +0100, David Howells wrote:
>
> Here are a set of patches to create a superblock configuration context
> prior to setting up a new mount, populating it with the parsed
> options/binary data, creating the superblock and then effecting the mount.
>
> This allows namespaces and other information to be conveyed through the
> mount procedure. It also allows extra error information to be returned
> (so many things can go wrong during a mount that a small integer isn't
> really sufficient to convey the issue).
>
> This also allows Miklós Szeredi's idea of doing:
>
> fd = fsopen("nfs");
> write(fd, "option=val", ...);
> fsmount(fd, "/mnt");
>
> that he presented at LSF-2017 to be implemented (see the relevant patches
> in the series), to which I can add:
>
> read(fd, error_buffer, ...);
>
> to read back any error message. I didn't use netlink as that would make it
> depend on CONFIG_NET and would introduce network namespacing issues.
Random notes:
* "sb_config" looks rather odd in the current variant; mount_context,
perhaps? Or fs_context, for that matter... Anyway, that's trivial.
* 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.
* 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.
* what's wrong with simple_pin_fs() as it is? You keep
vfs_kern_mount() anyway, so...
* vfs_new_sb_config(): please, move dealing with name into the caller.
Then you would be able to use it more than once.
* submount side of that thing: do we ever want a type different from
that of src_sb, and how the fuck would methods know what to do with it?
* remounts: where (if anywhere) do you call ->validate() for those,
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...
* 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.
* you don't need to register filesystem to use kern_mount()
* locking inode in fsmount(2). What for?
* ->sb_mountpoint(). YALinuxSadoMasochismHook. Not called on normal
mount(2) pathway. Yuck...
* could you split whitespace parts off? Minor, but...
* 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...
next prev parent reply other threads:[~2017-05-30 16:02 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 ` Al Viro [this message]
2017-05-30 15:36 ` [RFC][PATCH 00/23] VFS: Introduce superblock configuration context " David Howells
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=20170530145043.GG6365@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=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 \
/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).