diff options
| author | Chuck Lever <cel@citi.umich.edu> | 2002-10-06 19:35:02 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-06 19:35:02 -0700 |
| commit | 3a453bd45ad56f395eabc85b07605ca1b9841b90 (patch) | |
| tree | 8dd28122c263f47adf555113cc81a06d84776e9f /include | |
| parent | 7570df54ef8cc5b42500d26562ff50fcbe265aa2 (diff) | |
[PATCH] add struct file* to ->direct_IO addr space op
This makes file credentials available to the ->direct_IO address space
operation by replacing its struct inode* argument with a struct file*
argument. this patch is a prerequisite for NFS direct I/O support. it
breaks the raw device driver.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fs.h | 5 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 56f2bab87d7f..85eae7f44f29 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -308,7 +308,8 @@ struct address_space_operations { int (*bmap)(struct address_space *, long); int (*invalidatepage) (struct page *, unsigned long); int (*releasepage) (struct page *, int); - int (*direct_IO)(int, struct inode *, const struct iovec *iov, loff_t offset, unsigned long nr_segs); + int (*direct_IO)(int, struct file *, const struct iovec *iov, + loff_t offset, unsigned long nr_segs); }; struct backing_dev_info; @@ -1247,7 +1248,7 @@ ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos); extern ssize_t generic_file_sendfile(struct file *, struct file *, loff_t *, size_t); extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t); -extern ssize_t generic_file_direct_IO(int rw, struct inode *inode, +extern ssize_t generic_file_direct_IO(int rw, struct file *file, const struct iovec *iov, loff_t offset, unsigned long nr_segs); extern int generic_direct_IO(int rw, struct inode *inode, const struct iovec *iov, loff_t offset, unsigned long nr_segs, get_blocks_t *get_blocks); diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 16b3e1be73e3..c77fa88af5db 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -14,6 +14,7 @@ #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/wait.h> +#include <linux/uio.h> #include <linux/nfs_fs_sb.h> @@ -284,6 +285,12 @@ nfs_file_cred(struct file *file) } /* + * linux/fs/nfs/direct.c + */ +extern int nfs_direct_IO(int, struct file *, const struct iovec *, loff_t, + unsigned long); + +/* * linux/fs/nfs/dir.c */ extern struct inode_operations nfs_dir_inode_operations; |
