diff options
author | jiayingz@google.com (Jiaying Zhang) <> | 2010-07-27 11:56:06 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-07-27 11:56:06 -0400 |
commit | 5b3ff237bef43b9e7fb7d1eb858e29b73fd664f9 (patch) | |
tree | e3810d974a0e51a8c4b9046abdd36a5a4022abb3 /fs/ext4/ext4.h | |
parent | 552ef8024f909d9b3a7442d0ab0d48a22de24e9e (diff) |
ext4: move aio completion after unwritten extent conversion
This patch is to be applied upon Christoph's "direct-io: move aio_complete
into ->end_io" patch. It adds iocb and result fields to struct ext4_io_end_t,
so that we can call aio_complete from ext4_end_io_nolock() after the extent
conversion has finished.
I have verified with Christoph's aio-dio test that used to fail after a few
runs on an original kernel but now succeeds on the patched kernel.
See http://thread.gmane.org/gmane.comp.file-systems.ext4/19659 for details.
Signed-off-by: Jiaying Zhang <jiayingz@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 4c7d4727d6ba..fbb39478df28 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -170,13 +170,15 @@ struct mpage_da_data { | |||
170 | }; | 170 | }; |
171 | #define EXT4_IO_UNWRITTEN 0x1 | 171 | #define EXT4_IO_UNWRITTEN 0x1 |
172 | typedef struct ext4_io_end { | 172 | typedef struct ext4_io_end { |
173 | struct list_head list; /* per-file finished AIO list */ | 173 | struct list_head list; /* per-file finished IO list */ |
174 | struct inode *inode; /* file being written to */ | 174 | struct inode *inode; /* file being written to */ |
175 | unsigned int flag; /* unwritten or not */ | 175 | unsigned int flag; /* unwritten or not */ |
176 | struct page *page; /* page struct for buffer write */ | 176 | struct page *page; /* page struct for buffer write */ |
177 | loff_t offset; /* offset in the file */ | 177 | loff_t offset; /* offset in the file */ |
178 | ssize_t size; /* size of the extent */ | 178 | ssize_t size; /* size of the extent */ |
179 | struct work_struct work; /* data work queue */ | 179 | struct work_struct work; /* data work queue */ |
180 | struct kiocb *iocb; /* iocb struct for AIO */ | ||
181 | int result; /* error value for AIO */ | ||
180 | } ext4_io_end_t; | 182 | } ext4_io_end_t; |
181 | 183 | ||
182 | /* | 184 | /* |