aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 22833691e98c..ca9fda64dd4f 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -168,7 +168,20 @@ struct mpage_da_data {
168 int pages_written; 168 int pages_written;
169 int retval; 169 int retval;
170}; 170};
171#define EXT4_IO_UNWRITTEN 0x1 171
172/*
173 * Flags for ext4_io_end->flags
174 */
175#define EXT4_IO_END_UNWRITTEN 0x0001
176#define EXT4_IO_END_ERROR 0x0002
177
178struct ext4_io_page {
179 struct page *p_page;
180 int p_count;
181};
182
183#define MAX_IO_PAGES 128
184
172typedef struct ext4_io_end { 185typedef struct ext4_io_end {
173 struct list_head list; /* per-file finished IO list */ 186 struct list_head list; /* per-file finished IO list */
174 struct inode *inode; /* file being written to */ 187 struct inode *inode; /* file being written to */
@@ -179,8 +192,18 @@ typedef struct ext4_io_end {
179 struct work_struct work; /* data work queue */ 192 struct work_struct work; /* data work queue */
180 struct kiocb *iocb; /* iocb struct for AIO */ 193 struct kiocb *iocb; /* iocb struct for AIO */
181 int result; /* error value for AIO */ 194 int result; /* error value for AIO */
195 int num_io_pages;
196 struct ext4_io_page *pages[MAX_IO_PAGES];
182} ext4_io_end_t; 197} ext4_io_end_t;
183 198
199struct ext4_io_submit {
200 int io_op;
201 struct bio *io_bio;
202 ext4_io_end_t *io_end;
203 struct ext4_io_page *io_page;
204 sector_t io_next_block;
205};
206
184/* 207/*
185 * Special inodes numbers 208 * Special inodes numbers
186 */ 209 */
@@ -2044,6 +2067,17 @@ extern int ext4_move_extents(struct file *o_filp, struct file *d_filp,
2044 __u64 start_orig, __u64 start_donor, 2067 __u64 start_orig, __u64 start_donor,
2045 __u64 len, __u64 *moved_len); 2068 __u64 len, __u64 *moved_len);
2046 2069
2070/* page-io.c */
2071extern int __init init_ext4_pageio(void);
2072extern void exit_ext4_pageio(void);
2073extern void ext4_free_io_end(ext4_io_end_t *io);
2074extern ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags);
2075extern int ext4_end_io_nolock(ext4_io_end_t *io);
2076extern void ext4_io_submit(struct ext4_io_submit *io);
2077extern int ext4_bio_write_page(struct ext4_io_submit *io,
2078 struct page *page,
2079 int len,
2080 struct writeback_control *wbc);
2047 2081
2048/* BH_Uninit flag: blocks are allocated but uninitialized on disk */ 2082/* BH_Uninit flag: blocks are allocated but uninitialized on disk */
2049enum ext4_state_bits { 2083enum ext4_state_bits {