All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: David Howells <dhowells@redhat.com>
Cc: Karel Zak <kzak@redhat.com>,
	linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, Al Viro <viro@ZenIV.linux.org.uk>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	util-linux@vger.kernel.org, Andy Lutomirski <luto@amacapital.net>
Subject: Re: [RFD] A mount api that notices previous mounts
Date: Wed, 30 Jan 2019 07:35:39 -0600	[thread overview]
Message-ID: <87h8dqs1xw.fsf@xmission.com> (raw)
In-Reply-To: <9871.1548853314@warthog.procyon.org.uk> (David Howells's message of "Wed, 30 Jan 2019 13:01:54 +0000")

David Howells <dhowells@redhat.com> writes:

> Karel Zak <kzak@redhat.com> wrote:
>
>> It seems more elegant is to ask for Nth option as expected by fsinfo().
>
> More elegant yes, but there's an issue with atomiticity[*].  I'm in the
> process of switching to something that returns you a single buffer with all
> the options in, but each key and each value is preceded by a length count.
>
> The reasons for not using separator characters are:
>
>  (1) There's no separator char that cannot validly occur within an option[**].

*Blink*  I had missed the cifs issue.  So yes we certainly need
a better way to encode things in the buffer.  I just used a single
string as an easy way to place everything in a buffer.

>  (2) Makes it possible to return binary values if we need to.

I don't totally disagree with this.  But I will point out that
except for coda passing a file descriptor there are no filesystems
that currently take or need binary options.

I suspect that as long as userspace supports /etc/fstab and we in turn
support /proc/mounts there is going to be a lot of pressure to keep
the majority of options so they  can be encoded in a string separated by
commas.

> David
>
> [*] Atomic with respect to remount calls, that is.

There are also mount options that depend on each other and whose order
matters with respect to other mount options extN's ("sb=<NNNN>") for
example.

> [**] Oh, and look at cifs where you can *change* the separator char during
>      option parsing ("sep=<char>").

WARNING: multiple messages have this Message-ID (diff)
From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	util-linux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>
Subject: Re: [RFD] A mount api that notices previous mounts
Date: Wed, 30 Jan 2019 07:35:39 -0600	[thread overview]
Message-ID: <87h8dqs1xw.fsf@xmission.com> (raw)
In-Reply-To: <9871.1548853314-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org> (David Howells's message of "Wed, 30 Jan 2019 13:01:54 +0000")

David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> writes:

> Karel Zak <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
>> It seems more elegant is to ask for Nth option as expected by fsinfo().
>
> More elegant yes, but there's an issue with atomiticity[*].  I'm in the
> process of switching to something that returns you a single buffer with all
> the options in, but each key and each value is preceded by a length count.
>
> The reasons for not using separator characters are:
>
>  (1) There's no separator char that cannot validly occur within an option[**].

*Blink*  I had missed the cifs issue.  So yes we certainly need
a better way to encode things in the buffer.  I just used a single
string as an easy way to place everything in a buffer.

>  (2) Makes it possible to return binary values if we need to.

I don't totally disagree with this.  But I will point out that
except for coda passing a file descriptor there are no filesystems
that currently take or need binary options.

I suspect that as long as userspace supports /etc/fstab and we in turn
support /proc/mounts there is going to be a lot of pressure to keep
the majority of options so they  can be encoded in a string separated by
commas.

> David
>
> [*] Atomic with respect to remount calls, that is.

There are also mount options that depend on each other and whose order
matters with respect to other mount options extN's ("sb=<NNNN>") for
example.

> [**] Oh, and look at cifs where you can *change* the separator char during
>      option parsing ("sep=<char>").

  reply	other threads:[~2019-01-30 13:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 21:44 [RFD] A mount api that notices previous mounts Eric W. Biederman
2019-01-29 21:44 ` Eric W. Biederman
2019-01-29 23:01 ` Casey Schaufler
2019-01-29 23:01   ` Casey Schaufler
2019-01-30  1:15   ` Eric W. Biederman
2019-01-30  1:23     ` Eric W. Biederman
2019-01-30  1:23       ` Eric W. Biederman
2019-01-30 12:47       ` Eric W. Biederman
2019-01-30 16:19         ` Casey Schaufler
2019-01-30 16:19           ` Casey Schaufler
2019-01-30 12:06 ` Karel Zak
2019-01-30 12:06   ` Karel Zak
2019-01-30 13:45   ` Eric W. Biederman
2019-01-30 12:50 ` David Howells
2019-01-30 12:50   ` David Howells
2019-01-30 13:24   ` Eric W. Biederman
2019-01-30 13:24     ` Eric W. Biederman
2019-01-30 13:01 ` David Howells
2019-01-30 13:35   ` Eric W. Biederman [this message]
2019-01-30 13:35     ` Eric W. Biederman
2019-01-30 18:00     ` Karel Zak
2019-01-30 17:43   ` Karel Zak

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=87h8dqs1xw.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=dhowells@redhat.com \
    --cc=kzak@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=util-linux@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.