That's a little short of what I was intending. Ideally we stick 'struct
request', 'struct buffer_head' and 'struct bio' inside #ifdef
CONFIG_BLK_DEV, then kill all the dead code which uses them.
block_dev.c becomes...
int blkdev_open(struct inode * inode, struct file * filp)
{
return -ENXIO;
}
Don't look at JFFS; that still needs to be able to open a block device
even though it never actually _uses_ it. Look at the non-blkdev mount
path for JFFS2 instead. The _only_ thing we use the mtdblock device for
is to look at its minor number and use it to pick the right MTD device
-- it used to give us the locking on simultaneous mounts for free, a
constant device number for NFS exporting, and a cheap way to work around
the bug that the 'root=' command line option isn't available to
filesystems directly.
mtdblock.c cleanup noted with interest -- I'll play with that shortly;
thanks. Note that you don't actually need flash hardware, you can load
the 'mtdram' device which fakes it with vmalloc-backed storage instead.
Not too useful for powerfail-testing but for mounting something like
ext2 on mtdblock on mtdram it's fine.
-- dwmw2
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/