aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
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/aio.c
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/aio.c')
-rw-r--r--fs/aio.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 950630187acc..27ff56540c73 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -15,6 +15,7 @@
15#include <linux/aio_abi.h> 15#include <linux/aio_abi.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/syscalls.h> 17#include <linux/syscalls.h>
18#include <linux/uio.h>
18 19
19#define DEBUG 0 20#define DEBUG 0
20 21
@@ -1315,8 +1316,11 @@ static ssize_t aio_pread(struct kiocb *iocb)
1315 ssize_t ret = 0; 1316 ssize_t ret = 0;
1316 1317
1317 do { 1318 do {
1318 ret = file->f_op->aio_read(iocb, iocb->ki_buf, 1319 iocb->ki_inline_vec.iov_base = iocb->ki_buf;
1319 iocb->ki_left, iocb->ki_pos); 1320 iocb->ki_inline_vec.iov_len = iocb->ki_left;
1321
1322 ret = file->f_op->aio_read(iocb, &iocb->ki_inline_vec,
1323 1, iocb->ki_pos);
1320 /* 1324 /*
1321 * Can't just depend on iocb->ki_left to determine 1325 * Can't just depend on iocb->ki_left to determine
1322 * whether we are done. This may have been a short read. 1326 * whether we are done. This may have been a short read.
@@ -1349,8 +1353,11 @@ static ssize_t aio_pwrite(struct kiocb *iocb)
1349 ssize_t ret = 0; 1353 ssize_t ret = 0;
1350 1354
1351 do { 1355 do {
1352 ret = file->f_op->aio_write(iocb, iocb->ki_buf, 1356 iocb->ki_inline_vec.iov_base = iocb->ki_buf;
1353 iocb->ki_left, iocb->ki_pos); 1357 iocb->ki_inline_vec.iov_len = iocb->ki_left;
1358
1359 ret = file->f_op->aio_write(iocb, &iocb->ki_inline_vec,
1360 1, iocb->ki_pos);
1354 if (ret > 0) { 1361 if (ret > 0) {
1355 iocb->ki_buf += ret; 1362 iocb->ki_buf += ret;
1356 iocb->ki_left -= ret; 1363 iocb->ki_left -= ret;