[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: bomb out on unknown rootflags?



> On Sun, Dec 17, 2000 at 10:24:14AM -0800, Brian J. Murrell wrote:
> > Surely, some day, some other filesystem is going to want to use rootflags
> > to have one of it's options passed in which will be unknown to ext3.

If the options are unknown to ext3, then either it shouldn't be given if
you want ext3 as root, or you don't want ext3 as root...

> > Also there is a bug in passing root_mount_data to read_super() directly.
> > It seems that some filesystems (ext3 included!) such as isofs that want
> > to modify that data by putting a null between option/value pairs
> > (overwriting the '=').  The problem of course is that if that
> > option/value pair is for another filesystem type, to be evaluated later,
> > when it gets to the next filesystem processing option/value pairs it is
> > no longer a "option=value" but an "option\0value".  Or again, am I
> > missing something?

Stephen replied:
> Hmm.  I might fix that, but I'm more likely to remove rootflags
> altogether.

Actually, the problem exists independent of rootflags.  In the ext2/ext3
parse_options() code we do (right at the top of the parsing loop):

	if ((value = strchr (this_char, '=') != NULL)
		*value++ = 0;

so any parameter of the form name=value will be broken for any other
filesystems that try to parse it.  Since we call parse_options before
we even check if we are using an ext2/ext3 filesystem, we should have
problems...  Why have we not noticed yet?

> Rootflags was really mostly a hack to allow creation of
> journals on a root filesystem, in the absence of proper user-mode
> tools for setting up ext3 filesystems.  Once the new mkjournal.c code
> is integrated into tune2fs, then that will become the preferred way of
> setting ext3 parameters on the root filesystem.  At that point I'd
> want to drop rootflags in the interest of minimising the impact of
> ext3 on the surrounding VFS.

Actually, rootflags is useful for filesystems other than ext3.  Basically,
you _should_ be able to use available filesystem options for a root fs,
but some may need to be set at mount time instead of remount time.  IMHO,
maybe this should be submitted as a patch separate from ext3?

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]