Re: [PATCH 00/32] VFS: Introduce filesystem context [ver #8]
From: Theodore Y. Ts'o
Date: Mon Jun 18 2018 - 19:33:57 EST
On Mon, Jun 18, 2018 at 09:30:50PM +0100, David Howells wrote:
>
> The fscontext code *requires* you to parse the parameters *before* any attempt
> to access the superblock is made. Note that this will actually be a problem
> for, say, ext4 which passes a text string stored in the superblock through the
> parser *before* parsing the mount syscall data. Fun.
>
> I'm intending to deal with that particular case by having ext4 create multiple
> private contexts, one filled in from the user data, and then a second one
> filled in from the superblock string. These can then be validated one against
> the other before the super_block struct is published.
Yeah, what we're trying to do is let the options in the superblock act
as defaults which then can be overridden by what the user specifies on
the command line.
So when you parse the user-supplied data, will there be a way to
determine what was specified explicitly, versus what was implied by
the defaults? I'll need that in order to be able to merge the two
contexts together.
- Ted