linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pass iocb to dio_iodone_t
@ 2005-06-10 15:00 Christoph Hellwig
  2005-06-10 15:25 ` Badari Pulavarty
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2005-06-10 15:00 UTC (permalink / raw)
  To: akpm; +Cc: linux-fsdevel

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 */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-10 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-10 15:00 [PATCH] pass iocb to dio_iodone_t Christoph Hellwig
2005-06-10 15:25 ` Badari Pulavarty
2005-06-10 15:48   ` Christoph Hellwig
2005-06-10 15:37     ` Badari Pulavarty
2005-06-10 16:03       ` Christoph Hellwig

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).