Re: [PATCH] int (*readpage)(struct file *, struct page *);

From: Alexander Viro (
Date: Mon May 08 2000 - 15:12:05 EST

On Mon, 8 May 2000, Jeff V. Merkey wrote:

> I apologize for coming to the party late, but why are we changing this?
> Sounds like we might be breaking people's FS code again.
        Rules for repair:

                a) if in readpage() you are interested only in the inode -
        replace dentry->d_inode with page->mapping->host and change the
        type of the first argument (unused now) to struct file *.
                b) if you can't get out with just an inode - use
        file->f_dentry instead of dentry and be done with that. However,
                c) if your readpage() needs to know _who_ reads the thing
        (e.g. you have credentials associated with the opener and need
        them in read request) - well, you have struct file * now, so
        you can store the stuff needed in the file->private_data. That's
        the case for several network filesystems.

IOW, breakage is minimal and changes provide a clean way to deal with
several nasties in NFS and p9fs. Check the thread - you may actually
need it. Or not - I haven't look into nwfs code since _long_ ago and I
can't tell off-hand how useful it is for your situation.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:12 EST