All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: David Howells <dhowells@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 00/14] VFS: Make all filesystems implement ->show_options()
Date: Sat, 8 Jul 2017 11:33:41 -0400	[thread overview]
Message-ID: <20170708153341.i7h6wma6hykhz5jc@thunk.org> (raw)
In-Reply-To: <24033.1499443136@warthog.procyon.org.uk>

On Fri, Jul 07, 2017 at 04:58:56PM +0100, David Howells wrote:
> Yeah.  We actually currently get this *wrong* in both ext4 and btrfs - and
> probably other disk filesystems too.  During ext4 remount and btrfs remount,
> the options are parsed directly into the live xxx_fs_info struct, but if
> there's a parse error mid-way, we only partially apply the options and have no
> idea where it went wrong and what the current state is.
> 
> What I'm looking it is breaking it down into a number of steps:
> 
>  (1) Parse the options one at a time into a context struct.
> 
>  (2) Once we've got all the options, validate the options we've been given
>      with respect to themselves.
> 
>  (3) Under lock:
> 
>      (a) Check the coherency of the options we've been given with respect to
>      	 the superblock (if new mount) or the current live state (if remount).
> 
>      (b) Apply the options.  This is not permitted to fail.
> 
> This gets more complicated under ext4 as you've got an extra option string
> stored on disk that you also have to apply and combine with the options
> presented to the mount interface.

Remounts aren't really performance critical, so it might be simpler
just to do one pass which just checks the options, applying the
options to a scratch xx_fs_info struct, and if it seeded, redo the
parse from scratch, this time applying to the live xxx_fs_info struct.

      	   	    	      	       	  - Ted
					  

  reply	other threads:[~2017-07-08 15:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 15:24 [RFC][PATCH 00/14] VFS: Make all filesystems implement ->show_options() David Howells
2017-07-05 15:24 ` [PATCH 01/14] VFS: Don't use save/replace_mount_options if not using generic_show_options David Howells
2017-07-05 15:30   ` Steven Rostedt
2017-07-05 15:33   ` David Howells
2017-07-05 18:54     ` Steven Rostedt
2017-07-05 18:50   ` Greg Kroah-Hartman
2017-07-10 16:15   ` David Sterba
2017-07-05 15:24 ` [PATCH 02/14] hugetlbfs: Implement show_options David Howells
2017-07-05 15:24 ` [PATCH 03/14] omfs: " David Howells
2017-07-07 18:28   ` Bob Copeland
2017-07-05 15:24 ` [PATCH 04/14] pstore: " David Howells
2017-07-05 17:10   ` Kees Cook
2017-07-07 16:00   ` David Howells
2017-07-05 15:24 ` [PATCH 05/14] ramfs: " David Howells
2017-07-05 15:24 ` [PATCH 06/14] bpf: " David Howells
2017-07-06  8:00   ` Daniel Borkmann
2017-07-05 15:24 ` [PATCH 07/14] spufs: " David Howells
2017-07-05 15:25 ` [PATCH 08/14] befs: " David Howells
2017-07-05 15:25 ` [PATCH 09/14] affs: " David Howells
2017-07-05 15:25 ` [PATCH 10/14] afs: " David Howells
2017-07-05 15:25 ` [PATCH 11/14] isofs: " David Howells
2017-07-05 15:25 ` [PATCH 12/14] 9p: " David Howells
2017-07-11 22:34   ` Yury Norov
2017-07-11 23:34   ` David Howells
2017-07-05 15:25 ` [PATCH 13/14] orangefs: " David Howells
2017-07-05 15:25 ` [PATCH 14/14] VFS: Kill off s_options and helpers David Howells
2017-07-05 16:34 ` [RFC][PATCH 00/14] VFS: Make all filesystems implement ->show_options() Eric W. Biederman
2017-07-07 15:58 ` David Howells
2017-07-08 15:33   ` Theodore Ts'o [this message]
2017-07-11 15:22 ` [PATCH] isofs: Fix isofs_show_options() David Howells

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=20170708153341.i7h6wma6hykhz5jc@thunk.org \
    --to=tytso@mit.edu \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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.