On Sun, Apr 30, 2000 at 01:44:50PM +0400, Roman V. Shaposhnick wrote:
> Did you see my letter about readpage ? Nevertheless, I think that first
> argument of every function from address_space_operations should be
> "struct file *" and AFAIK this is 1) possible with the current kernel 2) will
> simplify things a lot since it lets one to see the whole picture:
> file->dentry->inode->pages, not the particular spot.
But an address_space is (or could be) a completely generic cache. It might
never be associated with an inode, let alone a dentry or file structure.
For example, I've got some experimental NTFS code which caches all metadata
in the page cache using the address_space stuff. (This /mostly/ works really
well, and makes the code a lot simpler. The only problem is
block_read_full_page() and friends, which do:
struct inode *inode = (struct inode*)page->mapping->host;
At the moment I have an evil hack in place -- I'm kludging up an inode
structure and temporarily changing mapping->host before I call
block_read_full_page. I'd really like to see this cleaned up, though I accept
it may not happen before 2.5.)