kernel command line arguments for block2mtd do not work

Ville Herva vherva at vianova.fi
Wed Jul 5 03:05:10 EDT 2006


On Wed, Jul 05, 2006 at 10:52:15AM +0400, you [Artem B. Bityutskiy] wrote:
> On Tue, 2006-07-04 at 17:38 +0300, Ville Herva wrote:
> > For the rough idea, see 
> >         http://iki.fi/v/tmp/block2mtd.c                      
> > (Sorry for the ugliness - it's just a workaround hack.)
> 
> Hello,
> 
> I'd suggest you to just send a patch. See "Patch submission" at
> http://www.linux-mtd.infradead.org/source.html

I don't think any of the ideas I listed to "fix" the problem are
satisfactory. They all run into the same dead-end of not having access to
the rootfs when parsing the arguments, and hence, not being able to open the
underlying blockdev. 

These days the kernel afaik does not have builtin
device name -> device number mapping (I think it used to - for rootfs
device mounting - but isn't that gone?). The device we are mounting might be
the rootfs, so /dev is not present. Hence, 
	open_bdev_excl(devname, O_RDWR, NULL); 
can't succeed.

What I _was_ able to do (see http://iki.fi/v/tmp/block2mtd.c) is to move the
argument parsing later in boot process - it doesn't fail anymore, but that
doesn't help much, since the device can't be opened. This means the error
message is much more helpful (and it won't crash), but is it worth it?

As a stop-gap measure I suggested making the "out of memory" message more
informative (e.g. "can't parse arguments - not possible from kernel command
line, see Documentation/block2dev.txt" or something.



-- v -- 

v at iki.fi





More information about the linux-mtd mailing list