diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-01-07 17:48:27 -0800 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2003-01-07 17:48:27 -0800 |
| commit | 08e6749ec237476d420316fac8de4449f6b29aa1 (patch) | |
| tree | 3ac7e6722f8956e0b7c52f15cb354a79b41b1430 /fs/block_dev.c | |
| parent | a6d61b6b2c6268f8ff493e0978cfbbaf2c74655c (diff) | |
[PATCH] AIO support for raw/O_DIRECT
Patch from Badari Pulavarty <pbadari@us.ibm.com> and myself
This patch adds the infrastructure for performing asynchronous (AIO) blockdev
direct-IO.
- Adds generic_file_aio_write_nolock() and make other
generic_file_*_write() to use it.
- Modify generic_file_direct_IO() and ->direct_IO() functions to take
"kiocb *" instead of "file *".
- Renames generic_direct_IO() to blockdev_direct_IO().
- Move generic_file_direct_IO() to mm/filemap.c (it is not
blockdev-specific, whereas the rest of fs/direct-io.c is).
- Add AIO read/write support to the raw driver.
Diffstat (limited to 'fs/block_dev.c')
| -rw-r--r-- | fs/block_dev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 2e0b69ff70a1..e1692fed1824 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -118,12 +118,13 @@ blkdev_get_blocks(struct inode *inode, sector_t iblock, } static int -blkdev_direct_IO(int rw, struct file *file, const struct iovec *iov, +blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t offset, unsigned long nr_segs) { + struct file *file = iocb->ki_filp; struct inode *inode = file->f_dentry->d_inode->i_mapping->host; - return generic_direct_IO(rw, inode, inode->i_bdev, iov, offset, + return blockdev_direct_IO(rw, iocb, inode, inode->i_bdev, iov, offset, nr_segs, blkdev_get_blocks); } |
