aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBadari Pulavarty <pbadari@us.ibm.com>2006-10-01 02:28:46 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:28 -0400
commit027445c37282bc1ed26add45e573ad2d3e4860a5 (patch)
tree93eab101a938ffebaea64703033c8649df4d73f0 /arch
parent9ea0f9499d15c49df23e7aac4332d830c40e12d0 (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 'arch')
-rw-r--r--arch/s390/hypfs/inode.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 813fc21358f9..cd702ae45d6d 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -134,12 +134,20 @@ static int hypfs_open(struct inode *inode, struct file *filp)
134 return 0; 134 return 0;
135} 135}
136 136
137static ssize_t hypfs_aio_read(struct kiocb *iocb, __user char *buf, 137static ssize_t hypfs_aio_read(struct kiocb *iocb, const struct iovec *iov,
138 size_t count, loff_t offset) 138 unsigned long nr_segs, loff_t offset)
139{ 139{
140 char *data; 140 char *data;
141 size_t len; 141 size_t len;
142 struct file *filp = iocb->ki_filp; 142 struct file *filp = iocb->ki_filp;
143 /* XXX: temporary */
144 char __user *buf = iov[0].iov_base;
145 size_t count = iov[0].iov_len;
146
147 if (nr_segs != 1) {
148 count = -EINVAL;
149 goto out;
150 }
143 151
144 data = filp->private_data; 152 data = filp->private_data;
145 len = strlen(data); 153 len = strlen(data);
@@ -158,12 +166,13 @@ static ssize_t hypfs_aio_read(struct kiocb *iocb, __user char *buf,
158out: 166out:
159 return count; 167 return count;
160} 168}
161static ssize_t hypfs_aio_write(struct kiocb *iocb, const char __user *buf, 169static ssize_t hypfs_aio_write(struct kiocb *iocb, const struct iovec *iov,
162 size_t count, loff_t pos) 170 unsigned long nr_segs, loff_t offset)
163{ 171{
164 int rc; 172 int rc;
165 struct super_block *sb; 173 struct super_block *sb;
166 struct hypfs_sb_info *fs_info; 174 struct hypfs_sb_info *fs_info;
175 size_t count = iov_length(iov, nr_segs);
167 176
168 sb = iocb->ki_filp->f_dentry->d_inode->i_sb; 177 sb = iocb->ki_filp->f_dentry->d_inode->i_sb;
169 fs_info = sb->s_fs_info; 178 fs_info = sb->s_fs_info;