From: Christoph Hellwig <hch@lst.de>
To: akpm@osdl.org
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH] pass iocb to dio_iodone_t
Date: Fri, 10 Jun 2005 17:00:52 +0200 [thread overview]
Message-ID: <20050610150052.GA1632@lst.de> (raw)
XFS will have to look at iocb->private to fix aio+dio. No other
filesystem is using the blockdev_direct_IO* end_io callback.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs-2.6.x/include/linux/fs.h
===================================================================
--- xfs-2.6.x.orig/include/linux/fs.h 2005-06-10 14:40:34.000000000 +0200
+++ xfs-2.6.x/include/linux/fs.h 2005-06-10 14:42:26.000000000 +0200
@@ -219,6 +219,7 @@
struct iovec;
struct nameidata;
+struct kiocb;
struct pipe_inode_info;
struct poll_table_struct;
struct kstatfs;
@@ -239,7 +240,7 @@
typedef int (get_blocks_t)(struct inode *inode, sector_t iblock,
unsigned long max_blocks,
struct buffer_head *bh_result, int create);
-typedef void (dio_iodone_t)(struct inode *inode, loff_t offset,
+typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
ssize_t bytes, void *private);
/*
@@ -301,7 +302,6 @@
struct page;
struct address_space;
struct writeback_control;
-struct kiocb;
struct address_space_operations {
int (*writepage)(struct page *page, struct writeback_control *wbc);
Index: xfs-2.6.x/fs/direct-io.c
===================================================================
--- xfs-2.6.x.orig/fs/direct-io.c 2005-06-10 14:40:34.000000000 +0200
+++ xfs-2.6.x/fs/direct-io.c 2005-06-10 14:42:26.000000000 +0200
@@ -214,7 +214,7 @@
static void dio_complete(struct dio *dio, loff_t offset, ssize_t bytes)
{
if (dio->end_io && dio->result)
- dio->end_io(dio->inode, offset, bytes, dio->map_bh.b_private);
+ dio->end_io(dio->iocb, offset, bytes, dio->map_bh.b_private);
if (dio->lock_type == DIO_LOCKING)
up_read(&dio->inode->i_alloc_sem);
}
Index: xfs-2.6.x/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- xfs-2.6.x.orig/fs/xfs/linux-2.6/xfs_aops.c 2005-06-10 14:40:34.000000000 +0200
+++ xfs-2.6.x/fs/xfs/linux-2.6/xfs_aops.c 2005-06-10 15:53:54.000000000 +0200
@@ -167,11 +167,12 @@
*/
STATIC void
linvfs_unwritten_convert_direct(
- struct inode *inode,
+ struct kiocb *iocb,
loff_t offset,
ssize_t size,
void *private)
{
+ struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
ASSERT(!private || inode == (struct inode *)private);
/* private indicates an unwritten extent lay beneath this IO */
next reply other threads:[~2005-06-10 15:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-10 15:00 Christoph Hellwig [this message]
2005-06-10 15:25 ` [PATCH] pass iocb to dio_iodone_t Badari Pulavarty
2005-06-10 15:48 ` Christoph Hellwig
2005-06-10 15:37 ` Badari Pulavarty
2005-06-10 16:03 ` Christoph Hellwig
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=20050610150052.GA1632@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@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).