From: "Aurélien Aptel" <aaptel@suse.com>
To: ronnie sahlberg <ronniesahlberg@gmail.com>,
David Howells <dhowells@redhat.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: [EXPERIMENT] new mount API verbose errors from userspace
Date: Wed, 03 Mar 2021 12:18:16 +0100 [thread overview]
Message-ID: <87k0qoxz7r.fsf@suse.com> (raw)
In-Reply-To: <CAN05THRV_Tns4MTO-GFNg0reR+HJKa1BCSQ0m23PTSryGNPCeg@mail.gmail.com>
ronnie sahlberg <ronniesahlberg@gmail.com> writes:
> I like this, this is very nice.
> But, as you touch upon, it requires we know in mount.c what type each
> argument is.
> Which is problematic because the list of mount arguments in cifs.ko
> has a fair amount of crunch
> and I think it would be unworkable to keep cifs-utils and cifs.ko in
> lockstep for every release where
> we modify a mount argument.
We could do some basic pattern matching: like if has no '=', assume
boolean flag. If value only made of number, assume int. String for
everything else.
But this might fail on numbers which are actually string
(e.g. password=123456).
> What I think we should have is a ioctl(), system-call,
> /proc/fs/cifs/options, where we can query the kernel/file-system
> module
> for "give me a list of all recognized mount options and their type"
> i.e. basically a way to fetch the "struct fs_parameter_spec" to userspace.
>
> This is probably something that would not be specific to cifs, but
> would apply to all filesystem modules.
That sounds like a good idea yes. I wonder if David Howells has
considered this.
We can already sort-of do this actually. We can have a special boolean
option "help" which on the kernel side would log the list of
options&types in the fs_context log (as "i" (info) messages).
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
next prev parent reply other threads:[~2021-03-04 0:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 18:56 [EXPERIMENT] new mount API verbose errors from userspace Aurélien Aptel
2021-03-01 20:57 ` Aurélien Aptel
2021-03-02 21:59 ` ronnie sahlberg
2021-03-03 11:18 ` Aurélien Aptel [this message]
2021-03-09 17:37 ` David Howells
2021-03-09 18:29 ` Aurélien Aptel
2021-03-18 13:10 ` [EXPERIMENT v2] " Aurélien Aptel
2021-04-09 4:36 ` Steve French
2021-04-12 17:52 ` [EXPERIMENT v3] " Aurélien Aptel
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=87k0qoxz7r.fsf@suse.com \
--to=aaptel@suse.com \
--cc=dhowells@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=ronniesahlberg@gmail.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).