Re: [PATCH 3/17] afs: convert afs_dir_get_page to read_kmap_page

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Thursday, April 12, 2007 - 12:43 pm

Nate Diller <nate.diller@gmail.com> wrote:


A better way might be to stick a void * in struct file and pass that through
to readpage() and readpages() instead of the struct file *.  That way, anyone
who wants the traditional arrangement can just point that extra void * at the
struct file.

Of course, I'm in favour of making it a struct key * like this:

	struct address_space_operations {
	...
		int (*readpage)(struct key *, struct page *);
	...
		int (*readpages)(struct key *, struct address_space *,
				struct list_head *, unsigned);
	...
	};

	struct file {
	...
		struct key *f_key;
	};

	struct page *filemap_nopage(struct vm_area_struct *area, ...)
	{
	...
		struct file *file = area->vm_file;
	...
		error = mapping->a_ops->readpage(file->f_key, page);
	...
	}
	
But I'm not sure the NFS crew, for instance, would be happy with that.  Maybe
passing file->private_data through would do.  That's basically what NFS and
FUSE, for instance, want, and it would also do for AFS.

David
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/17] cramfs: use read_mapping_page, Nate Diller, (Wed Apr 11, 7:49 pm)
[PATCH 10/17] mtd: convert page_read to read_kmap_page, Nate Diller, (Wed Apr 11, 7:49 pm)
[PATCH 8/17] jfs: use locking read_mapping_page, Nate Diller, (Wed Apr 11, 7:49 pm)
Re: [PATCH 1/17] cramfs: use read_mapping_page, Christoph Hellwig, (Thu Apr 12, 2:54 am)
Re: [PATCH 1/17] cramfs: use read_mapping_page, Roman Zippel, (Thu Apr 12, 4:26 am)
Re: [PATCH 1/17] cramfs: use read_mapping_page, Nate Diller, (Thu Apr 12, 11:36 am)
Re: [PATCH 3/17] afs: convert afs_dir_get_page to read_kma ..., David Howells, (Thu Apr 12, 12:43 pm)
Drop patch update-isdn-tree-to-use-pci_get_device.patch fr ..., Surya Prabhakar N, (Sun Jul 15, 11:05 pm)