OSDN Git Service

direct-io: move aio_complete into ->end_io
authorChristoph Hellwig <hch@infradead.org>
Sun, 18 Jul 2010 21:17:09 +0000 (21:17 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:10 +0000 (13:36 -0700)
commit1ee3a461df139a0dc8642d951a41507fd80df30c
tree9b0f23f89a5243475cd6aa6807d2a06ad55e9cf9
parent339cdb0406b8faae3a8250478059360f32e6a1bf
direct-io: move aio_complete into ->end_io

commit 40e2e97316af6e62affab7a392e792494b8d9dde upstream.

Filesystems with unwritten extent support must not complete an AIO request
until the transaction to convert the extent has been commited.  That means
the aio_complete calls needs to be moved into the ->end_io callback so
that the filesystem can control when to call it exactly.

This makes a bit of a mess out of dio_complete and the ->end_io callback
prototype even more complicated.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Alex Elder <aelder@sgi.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/direct-io.c
fs/ext4/inode.c
fs/ocfs2/aops.c
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_aops.h
include/linux/fs.h