Re: [RFD] A mount api that notices previous mounts

From: Eric W. Biederman
Date: Wed Jan 30 2019 - 08:45:43 EST


Karel Zak <kzak@xxxxxxxxxx> writes:

> On Tue, Jan 29, 2019 at 03:44:22PM -0600, Eric W. Biederman wrote:
>> so I am proposing we change this in the new mount api.
>
> Well, this forces me to ask what the new API is? :-)
>
> It seems that David uses fsconfig() and fsinfo() to set and get
> mount options, and your patch introduces fsset() and fsoptions().
>
> IMHO differentiate between FS driver and FS instance is a good idea it
> makes things more extendable. The sequence number in the instance is a
> good example.
>
> But for me David's fsinfo() seems better that fsoptions() and
> fsspecifier(). I'm not sure about "all mount options as one string"
> From your example is pretty obvious how much energy is necessary to
> split and join the strings.
>
> It seems more elegant is to ask for Nth option as expected by fsinfo().
> It also seems that fsinfo() is able to replace fsname() and fstype().
>
> It would be better to extend David's fsinfo() to work with FS instance
> and to return specifiers. And use fsconfig() rather than fsset().

As David has pointed out with cifs having a sep= option we need a better
story of parsing the options in the kernel.

What my branch does is demonstrate there is at least one way we can
avoid mount options being silently different from what userspace
expects.

Which means my branch is fine for looking at semantics and possible
system calls, but not much else.

I actually used multiple system calls just so I could avoid dealing
with multi-plexor systems calls.

Eric