Re: [PATCH] Only use MSDOS-Partitions by default on X86

David Woodhouse (dwmw2@infradead.org)
Tue, 06 May 2003 22:01:28 +0100


On Tue, 2003-05-06 at 19:49, Jens Axboe wrote:
> I see, that would indeed be a bigger job :). Just the block layer would
> not be hard, especially if you make the restriction that the block
> drivers usable would be ones that used a make_request strategy for
> handling requests. That would allow you to kill ll_rw_blk.c,
> deadline-iosched.c, and elevator.c. That's some 21k of text and 2k of
> data on this box.

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/