diff options
author | Badari Pulavarty <pbadari@us.ibm.com> | 2006-10-01 02:28:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:28 -0400 |
commit | 027445c37282bc1ed26add45e573ad2d3e4860a5 (patch) | |
tree | 93eab101a938ffebaea64703033c8649df4d73f0 /include | |
parent | 9ea0f9499d15c49df23e7aac4332d830c40e12d0 (diff) |
[PATCH] Vectorize aio_read/aio_write fileop methods
This patch vectorizes aio_read() and aio_write() methods to prepare for
collapsing all aio & vectored operations into one interface - which is
aio_read()/aio_write().
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Michael Holzheu <HOLZHEU@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/aio.h | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 10 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 10 | ||||
-rw-r--r-- | include/net/sock.h | 1 |
4 files changed, 13 insertions, 10 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 8a0193385a9b..58349e58b749 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/workqueue.h> | 5 | #include <linux/workqueue.h> |
6 | #include <linux/aio_abi.h> | 6 | #include <linux/aio_abi.h> |
7 | #include <linux/uio.h> | ||
7 | 8 | ||
8 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
9 | 10 | ||
@@ -112,6 +113,7 @@ struct kiocb { | |||
112 | long ki_retried; /* just for testing */ | 113 | long ki_retried; /* just for testing */ |
113 | long ki_kicked; /* just for testing */ | 114 | long ki_kicked; /* just for testing */ |
114 | long ki_queued; /* just for testing */ | 115 | long ki_queued; /* just for testing */ |
116 | struct iovec ki_inline_vec; /* inline vector */ | ||
115 | 117 | ||
116 | struct list_head ki_list; /* the aio core uses this | 118 | struct list_head ki_list; /* the aio core uses this |
117 | * for cancellation */ | 119 | * for cancellation */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5baf3a153403..257bae16f545 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1097,9 +1097,9 @@ struct file_operations { | |||
1097 | struct module *owner; | 1097 | struct module *owner; |
1098 | loff_t (*llseek) (struct file *, loff_t, int); | 1098 | loff_t (*llseek) (struct file *, loff_t, int); |
1099 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); | 1099 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); |
1100 | ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t); | ||
1101 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 1100 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
1102 | ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t); | 1101 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
1102 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | ||
1103 | int (*readdir) (struct file *, void *, filldir_t); | 1103 | int (*readdir) (struct file *, void *, filldir_t); |
1104 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 1104 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
1105 | int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); | 1105 | int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); |
@@ -1704,11 +1704,11 @@ extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned | |||
1704 | extern ssize_t generic_file_read(struct file *, char __user *, size_t, loff_t *); | 1704 | extern ssize_t generic_file_read(struct file *, char __user *, size_t, loff_t *); |
1705 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); | 1705 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); |
1706 | extern ssize_t generic_file_write(struct file *, const char __user *, size_t, loff_t *); | 1706 | extern ssize_t generic_file_write(struct file *, const char __user *, size_t, loff_t *); |
1707 | extern ssize_t generic_file_aio_read(struct kiocb *, char __user *, size_t, loff_t); | 1707 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
1708 | extern ssize_t __generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t *); | 1708 | extern ssize_t __generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t *); |
1709 | extern ssize_t generic_file_aio_write(struct kiocb *, const char __user *, size_t, loff_t); | 1709 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
1710 | extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, | 1710 | extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, |
1711 | unsigned long, loff_t *); | 1711 | unsigned long, loff_t); |
1712 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, | 1712 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, |
1713 | unsigned long *, loff_t, loff_t *, size_t, size_t); | 1713 | unsigned long *, loff_t, loff_t *, size_t, size_t); |
1714 | extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | 1714 | extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 98c9b9f667a5..76ff54846ada 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -367,10 +367,12 @@ extern int nfs3_removexattr (struct dentry *, const char *name); | |||
367 | */ | 367 | */ |
368 | extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, | 368 | extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, |
369 | unsigned long); | 369 | unsigned long); |
370 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, char __user *buf, | 370 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, |
371 | size_t count, loff_t pos); | 371 | const struct iovec *iov, unsigned long nr_segs, |
372 | extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, | 372 | loff_t pos); |
373 | size_t count, loff_t pos); | 373 | extern ssize_t nfs_file_direct_write(struct kiocb *iocb, |
374 | const struct iovec *iov, unsigned long nr_segs, | ||
375 | loff_t pos); | ||
374 | 376 | ||
375 | /* | 377 | /* |
376 | * linux/fs/nfs/dir.c | 378 | * linux/fs/nfs/dir.c |
diff --git a/include/net/sock.h b/include/net/sock.h index edd4d73ce7f5..40bb90ebb2d1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -665,7 +665,6 @@ struct sock_iocb { | |||
665 | struct sock *sk; | 665 | struct sock *sk; |
666 | struct scm_cookie *scm; | 666 | struct scm_cookie *scm; |
667 | struct msghdr *msg, async_msg; | 667 | struct msghdr *msg, async_msg; |
668 | struct iovec async_iov; | ||
669 | struct kiocb *kiocb; | 668 | struct kiocb *kiocb; |
670 | }; | 669 | }; |
671 | 670 | ||