From: Jeff Layton <jlayton@redhat.com>
To: David Howells <dhowells@redhat.com>, Sargun Dhillon <sargun@sargun.me>
Cc: mszeredi@redhat.com, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 07/14] Implement fsopen() to prepare for a mount
Date: Thu, 11 May 2017 10:35:11 -0400 [thread overview]
Message-ID: <1494513311.8853.5.camel@redhat.com> (raw)
In-Reply-To: <6167.1494513034@warthog.procyon.org.uk>
On Thu, 2017-05-11 at 15:30 +0100, David Howells wrote:
> Sargun Dhillon <sargun@sargun.me> wrote:
>
> > Instead of string based configuration, does it perhaps make sense to
> > pass in structured mount data? Something like:
>
> I don't think it helps particularly.
>
> > enum mount_command_id {
> > MOUNT_OPTION_STR,
> > MOUNT_SET_USER_NS
> > };
> >
> > struct mount_attr {
> > __u64 command_id;
> > union {
> > char option_str[4095];
> > char mount_source[PATH_MAX];
>
> Why limit the option size to 4096? I can see situations where it might be
> necessary to hand in a bigger blob - giving cifs a Microsoft Kerberos PAC for
> example.
>
> > struct {
> > __u32 user_ns_fd
>
> There are more than just that namespace that could be relevant.
>
> > }
> > }
> > }
> >
> > It seems a lot less error prone to me.
>
> Not really. The only real difference is how one selects what action is
> intended and how one determines the length. write() has a length parameter.
>
Agreed. I like the text based configuration better.
It also has another advantage: It's easy to strace the program and see
what it's doing. With an opaque blob, we'd need to teach strace how to
format the thing to be able to view it.
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2017-05-11 14:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-10 16:18 [RFC][PATCH 00/14] VFS: Introduce superblock configuration context David Howells
2017-05-10 16:18 ` [PATCH 01/14] Provide a function to create a NUL-terminated string from unterminated data David Howells
2017-05-10 16:18 ` [PATCH 02/14] Clean up whitespace in fs/namespace.c David Howells
2017-05-10 16:18 ` [PATCH 03/14] VFS: Make get_mnt_ns() return the namespace David Howells
2017-05-10 16:19 ` [PATCH 04/14] VFS: Make get_filesystem() return the affected filesystem David Howells
2017-05-10 16:19 ` [PATCH 05/14] VFS: Provide empty name qstr David Howells
2017-05-10 16:19 ` [PATCH 06/14] VFS: Introduce a superblock configuration context David Howells
2017-05-11 7:24 ` Al Viro
2017-05-10 16:19 ` [PATCH 07/14] Implement fsopen() to prepare for a mount David Howells
2017-05-10 21:59 ` Sargun Dhillon
2017-05-11 14:30 ` David Howells
2017-05-11 14:35 ` Jeff Layton [this message]
2017-05-10 16:19 ` [PATCH 08/14] Implement fsmount() to effect a pre-configured mount David Howells
2017-05-10 16:19 ` [PATCH 09/14] Sample program for driving fsopen/fsmount David Howells
2017-05-10 16:19 ` [PATCH 10/14] procfs: Move proc_fill_super() to fs/proc/root.c David Howells
2017-05-10 16:19 ` [PATCH 11/14] proc: Add superblock config support to procfs David Howells
2017-05-10 16:20 ` [PATCH 13/14] Support legacy filesystems David Howells
2017-05-10 16:20 ` [PATCH 14/14] Add commands to create or update a superblock David Howells
2017-05-11 7:38 ` Al Viro
2017-05-11 8:11 ` 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=1494513311.8853.5.camel@redhat.com \
--to=jlayton@redhat.com \
--cc=dhowells@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=sargun@sargun.me \
--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).