aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs
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 /fs/ntfs
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 'fs/ntfs')
-rw-r--r--fs/ntfs/file.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index 585a79d39c9d..0c46f5c86b71 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -2176,20 +2176,18 @@ out:
2176/** 2176/**
2177 * ntfs_file_aio_write - 2177 * ntfs_file_aio_write -
2178 */ 2178 */
2179static ssize_t ntfs_file_aio_write(struct kiocb *iocb, const char __user *buf, 2179static ssize_t ntfs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
2180 size_t count, loff_t pos) 2180 unsigned long nr_segs, loff_t pos)
2181{ 2181{
2182 struct file *file = iocb->ki_filp; 2182 struct file *file = iocb->ki_filp;
2183 struct address_space *mapping = file->f_mapping; 2183 struct address_space *mapping = file->f_mapping;
2184 struct inode *inode = mapping->host; 2184 struct inode *inode = mapping->host;
2185 ssize_t ret; 2185 ssize_t ret;
2186 struct iovec local_iov = { .iov_base = (void __user *)buf,
2187 .iov_len = count };
2188 2186
2189 BUG_ON(iocb->ki_pos != pos); 2187 BUG_ON(iocb->ki_pos != pos);
2190 2188
2191 mutex_lock(&inode->i_mutex); 2189 mutex_lock(&inode->i_mutex);
2192 ret = ntfs_file_aio_write_nolock(iocb, &local_iov, 1, &iocb->ki_pos); 2190 ret = ntfs_file_aio_write_nolock(iocb, iov, nr_segs, &iocb->ki_pos);
2193 mutex_unlock(&inode->i_mutex); 2191 mutex_unlock(&inode->i_mutex);
2194 if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) { 2192 if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
2195 int err = sync_page_range(inode, mapping, pos, ret); 2193 int err = sync_page_range(inode, mapping, pos, ret);