aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r--fs/btrfs/extent_io.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 78bb4d76127b..1f8478dc9f8e 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -92,18 +92,27 @@ typedef int (extent_submit_bio_hook_t)(struct inode *inode, struct bio *bio,
92 int mirror_num, unsigned long bio_flags, 92 int mirror_num, unsigned long bio_flags,
93 u64 bio_offset); 93 u64 bio_offset);
94struct extent_io_ops { 94struct extent_io_ops {
95 int (*fill_delalloc)(struct inode *inode, struct page *locked_page, 95 /*
96 u64 start, u64 end, int *page_started, 96 * The following callbacks must be allways defined, the function
97 unsigned long *nr_written); 97 * pointer will be called unconditionally.
98 int (*writepage_start_hook)(struct page *page, u64 start, u64 end); 98 */
99 extent_submit_bio_hook_t *submit_bio_hook; 99 extent_submit_bio_hook_t *submit_bio_hook;
100 int (*readpage_end_io_hook)(struct btrfs_io_bio *io_bio, u64 phy_offset,
101 struct page *page, u64 start, u64 end,
102 int mirror);
100 int (*merge_bio_hook)(struct page *page, unsigned long offset, 103 int (*merge_bio_hook)(struct page *page, unsigned long offset,
101 size_t size, struct bio *bio, 104 size_t size, struct bio *bio,
102 unsigned long bio_flags); 105 unsigned long bio_flags);
106
107 /*
108 * Optional hooks, called if the pointer is not NULL
109 */
110 int (*fill_delalloc)(struct inode *inode, struct page *locked_page,
111 u64 start, u64 end, int *page_started,
112 unsigned long *nr_written);
103 int (*readpage_io_failed_hook)(struct page *page, int failed_mirror); 113 int (*readpage_io_failed_hook)(struct page *page, int failed_mirror);
104 int (*readpage_end_io_hook)(struct btrfs_io_bio *io_bio, u64 phy_offset, 114
105 struct page *page, u64 start, u64 end, 115 int (*writepage_start_hook)(struct page *page, u64 start, u64 end);
106 int mirror);
107 void (*writepage_end_io_hook)(struct page *page, u64 start, u64 end, 116 void (*writepage_end_io_hook)(struct page *page, u64 start, u64 end,
108 struct extent_state *state, int uptodate); 117 struct extent_state *state, int uptodate);
109 void (*set_bit_hook)(struct inode *inode, struct extent_state *state, 118 void (*set_bit_hook)(struct inode *inode, struct extent_state *state,