Re: mmap on a device returns ENODEV

Alexander Viro (viro@math.psu.edu)
Wed, 8 Dec 1999 19:40:33 -0500 (EST)


On Wed, 8 Dec 1999, Linus Torvalds wrote:

> Yes. It's still not done in 2.3.x, but in 2.3.x it should be trivial to
> do:
> - make raw devices (well, the "pseudo-raw" ones that Linux uses) use
> "generic_file_read()" and "generic_file_write()"
> - implement readpage and writepage for them (simple: you should be able
> to use the generic_block_readpage() and generic_block_writepage()
> functionality trivially, by just supplying a 1:1 block_map() function.

While we are at it, _that_ would clean up the swap handling and
possibly allow to kill brw_block(). Which would be a Good Thing(tm).
Another thing I'ld really like to see is multi-page variant of readpage()
and corresponding write functions. Actually we might even be better off
with PAGE_CACHE_SHIFT being a per-cache variable... That would solve the
problem neatly _and_ allow for larger-than-page blocks. Not to mention the
big friggin' cleanup of DMSDOS => FAT => UMSDOS. Hell knows if it's worth
the penalty... Opinions?

> This is one of those "small details" that I've wanted for a long time.
> I've never had the time to actually do it, even though it should be
> trivial. The sucker^H^H^H^H^H^Hperson to ask is probably Alex Viro or Ingo
> Molnar, and see if you can entice them into doing it - they both know this

Geez... Thanks. Actually I'ld rather finish this story with the
symlinks-in-pagecache patch first. Could you comment on the variant I've
sent to you yesterday? It applies to 2.3.31 and seems to work here. I can
rediff it if you want but that would differ only in one-line offset at
fs/ext2/inode.c

Al, back from _really_ nasty trip into academentia stuff.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/