mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
[PATCH] pass iocb to dio_iodone_t
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
16c29b67fb
commit
92198f7eaa
@ -215,7 +215,7 @@ static struct page *dio_get_page(struct dio *dio)
|
|||||||
static void dio_complete(struct dio *dio, loff_t offset, ssize_t bytes)
|
static void dio_complete(struct dio *dio, loff_t offset, ssize_t bytes)
|
||||||
{
|
{
|
||||||
if (dio->end_io && dio->result)
|
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)
|
if (dio->lock_type == DIO_LOCKING)
|
||||||
up_read(&dio->inode->i_alloc_sem);
|
up_read(&dio->inode->i_alloc_sem);
|
||||||
}
|
}
|
||||||
|
@ -149,11 +149,12 @@ linvfs_unwritten_convert(
|
|||||||
*/
|
*/
|
||||||
STATIC void
|
STATIC void
|
||||||
linvfs_unwritten_convert_direct(
|
linvfs_unwritten_convert_direct(
|
||||||
struct inode *inode,
|
struct kiocb *iocb,
|
||||||
loff_t offset,
|
loff_t offset,
|
||||||
ssize_t size,
|
ssize_t size,
|
||||||
void *private)
|
void *private)
|
||||||
{
|
{
|
||||||
|
struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
|
||||||
ASSERT(!private || inode == (struct inode *)private);
|
ASSERT(!private || inode == (struct inode *)private);
|
||||||
|
|
||||||
/* private indicates an unwritten extent lay beneath this IO */
|
/* private indicates an unwritten extent lay beneath this IO */
|
||||||
|
@ -220,6 +220,7 @@ extern int dir_notify_enable;
|
|||||||
|
|
||||||
struct iovec;
|
struct iovec;
|
||||||
struct nameidata;
|
struct nameidata;
|
||||||
|
struct kiocb;
|
||||||
struct pipe_inode_info;
|
struct pipe_inode_info;
|
||||||
struct poll_table_struct;
|
struct poll_table_struct;
|
||||||
struct kstatfs;
|
struct kstatfs;
|
||||||
@ -240,7 +241,7 @@ typedef int (get_block_t)(struct inode *inode, sector_t iblock,
|
|||||||
typedef int (get_blocks_t)(struct inode *inode, sector_t iblock,
|
typedef int (get_blocks_t)(struct inode *inode, sector_t iblock,
|
||||||
unsigned long max_blocks,
|
unsigned long max_blocks,
|
||||||
struct buffer_head *bh_result, int create);
|
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);
|
ssize_t bytes, void *private);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -302,7 +303,6 @@ struct iattr {
|
|||||||
struct page;
|
struct page;
|
||||||
struct address_space;
|
struct address_space;
|
||||||
struct writeback_control;
|
struct writeback_control;
|
||||||
struct kiocb;
|
|
||||||
|
|
||||||
struct address_space_operations {
|
struct address_space_operations {
|
||||||
int (*writepage)(struct page *page, struct writeback_control *wbc);
|
int (*writepage)(struct page *page, struct writeback_control *wbc);
|
||||||
|
Loading…
Reference in New Issue
Block a user