cramfs and mtd

David Woodhouse dwmw2 at infradead.org
Thu Apr 19 07:33:37 EDT 2001


bjorn.wesen at axis.com said:
> When using cramfs directly on a ROM chip like below.. can we make
> cramfs/inode.c talk to mtd to find a chip maybe instead of using
> direct pointers like I do in my small patch below ? That is, would it
> mess up inode.c to the degree that it would not be accepted in the
> mainline kernel ? :) Or is there a better way to do this ? 

See the evil hack in jffs and jffs2 which uses the minor number of the 
mtdblock device to get a handle on the underlying MTD device. Copy that and 
then use the MTD device directly for read/write.

The real advantage of cramfs-on-mtd comes when you can set 
CONFIG_BLK_DEV=n, though - which means the above evil hack is no longer 
possible. We need to remove FS_REQUIRES_DEV from JFFS{,2} and pass the name 
or number of the MTD device as a mount option instead. If you're doing the 
same thing for cramfs, it's probably better to copy the cramfs code to a 
new filesystem (cmtdfs?) and hack it there. 

There are also vague plans to provide an 'xipfs', which has page-aligned 
data, for the benefit of those with more flash space than sense.

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list