Re: Linux 2.4.10-pre11

Linus Torvalds (torvalds@transmeta.com)
Tue, 18 Sep 2001 09:45:00 -0700 (PDT)


On Tue, 18 Sep 2001, Alexander Viro wrote:
>
> Umm... Linus, had you actually read through the fs/block_device.c part
> of that? It's not just ugly as hell, it's (AFAICS) not hard to oops
> if you have several inodes sharing major:minor. ->bd_inode and its
> treatment are bogus. Please, read it through and consider reverting -
> in its current state code is an ugly mess.

Funny that you mention it, because I actually have a cunning plan, and
you're an unwitting part of it.

Or actually, I hope you're a "witting" part of it, because it's going to
be your code.

Take your "struct block_device" code, add a "struct address_space" to it,
and whenever a block device inode is opened, make the inode->i_mapping
point to &bdev->b_data, and voila..

You already get all the reference counting right, and it's the only
sensible place to do it anyway, wouldn't you agree?

I thought you'd be thrilled. It seems to match your lazy allocation patch
very well..

Linus

-
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/