From: Janet Morgan <janetmor@us.ibm.com>
To: linux-kernel@vger.kernel.org, akpm@digeo.com, linux-aio@kvack.org
Subject: [PATCH] aio methods for block devices
Date: Wed, 23 Apr 2003 18:05:22 -0700 [thread overview]
Message-ID: <3EA73852.24923A52@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 106 bytes --]
Here's a small patch that adds aio_read and aio_write methods to the
block device driver.
Thanks,
-Janet
[-- Attachment #2: blkaio.patch --]
[-- Type: text/plain, Size: 929 bytes --]
--- linux-2.5.68/fs/block_dev.c Sat Apr 19 19:51:22 2003
+++ aio/fs/block_dev.c Wed Apr 23 13:21:26 2003
@@ -703,6 +703,15 @@ static ssize_t blkdev_file_write(struct
return generic_file_write_nolock(file, &local_iov, 1, ppos);
}
+static ssize_t blkdev_file_aio_write(struct kiocb *iocb, const char *buf,
+ size_t count, loff_t pos)
+{
+ struct iovec local_iov = { .iov_base = (void *)buf, .iov_len = count };
+
+ return generic_file_aio_write_nolock(iocb, &local_iov, 1, &iocb->ki_pos);
+}
+
+
struct address_space_operations def_blk_aops = {
.readpage = blkdev_readpage,
.writepage = blkdev_writepage,
@@ -719,6 +728,8 @@ struct file_operations def_blk_fops = {
.llseek = block_llseek,
.read = generic_file_read,
.write = blkdev_file_write,
+ .aio_read = generic_file_aio_read,
+ .aio_write = blkdev_file_aio_write,
.mmap = generic_file_mmap,
.fsync = block_fsync,
.ioctl = blkdev_ioctl,
reply other threads:[~2003-04-24 1:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EA73852.24923A52@us.ibm.com \
--to=janetmor@us.ibm.com \
--cc=akpm@digeo.com \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).