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.h40
1 files changed, 4 insertions, 36 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index af2d7179c372..4e8445a4757c 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -153,23 +153,14 @@ static inline int extent_compress_type(unsigned long bio_flags)
153 153
154struct extent_map_tree; 154struct extent_map_tree;
155 155
156static inline struct extent_state *extent_state_next(struct extent_state *state)
157{
158 struct rb_node *node;
159 node = rb_next(&state->rb_node);
160 if (!node)
161 return NULL;
162 return rb_entry(node, struct extent_state, rb_node);
163}
164
165typedef struct extent_map *(get_extent_t)(struct inode *inode, 156typedef struct extent_map *(get_extent_t)(struct inode *inode,
166 struct page *page, 157 struct page *page,
167 size_t page_offset, 158 size_t pg_offset,
168 u64 start, u64 len, 159 u64 start, u64 len,
169 int create); 160 int create);
170 161
171void extent_io_tree_init(struct extent_io_tree *tree, 162void extent_io_tree_init(struct extent_io_tree *tree,
172 struct address_space *mapping, gfp_t mask); 163 struct address_space *mapping);
173int try_release_extent_mapping(struct extent_map_tree *map, 164int try_release_extent_mapping(struct extent_map_tree *map,
174 struct extent_io_tree *tree, struct page *page, 165 struct extent_io_tree *tree, struct page *page,
175 gfp_t mask); 166 gfp_t mask);
@@ -215,14 +206,8 @@ int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end,
215 gfp_t mask); 206 gfp_t mask);
216int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, 207int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end,
217 gfp_t mask); 208 gfp_t mask);
218int clear_extent_ordered(struct extent_io_tree *tree, u64 start, u64 end,
219 gfp_t mask);
220int clear_extent_ordered_metadata(struct extent_io_tree *tree, u64 start,
221 u64 end, gfp_t mask);
222int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end, 209int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end,
223 struct extent_state **cached_state, gfp_t mask); 210 struct extent_state **cached_state, gfp_t mask);
224int set_extent_ordered(struct extent_io_tree *tree, u64 start, u64 end,
225 gfp_t mask);
226int find_first_extent_bit(struct extent_io_tree *tree, u64 start, 211int find_first_extent_bit(struct extent_io_tree *tree, u64 start,
227 u64 *start_ret, u64 *end_ret, int bits); 212 u64 *start_ret, u64 *end_ret, int bits);
228struct extent_state *find_first_extent_bit_state(struct extent_io_tree *tree, 213struct extent_state *find_first_extent_bit_state(struct extent_io_tree *tree,
@@ -243,28 +228,17 @@ int extent_readpages(struct extent_io_tree *tree,
243 struct address_space *mapping, 228 struct address_space *mapping,
244 struct list_head *pages, unsigned nr_pages, 229 struct list_head *pages, unsigned nr_pages,
245 get_extent_t get_extent); 230 get_extent_t get_extent);
246int extent_prepare_write(struct extent_io_tree *tree,
247 struct inode *inode, struct page *page,
248 unsigned from, unsigned to, get_extent_t *get_extent);
249int extent_commit_write(struct extent_io_tree *tree,
250 struct inode *inode, struct page *page,
251 unsigned from, unsigned to);
252sector_t extent_bmap(struct address_space *mapping, sector_t iblock,
253 get_extent_t *get_extent);
254int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, 231int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
255 __u64 start, __u64 len, get_extent_t *get_extent); 232 __u64 start, __u64 len, get_extent_t *get_extent);
256int set_range_dirty(struct extent_io_tree *tree, u64 start, u64 end);
257int set_state_private(struct extent_io_tree *tree, u64 start, u64 private); 233int set_state_private(struct extent_io_tree *tree, u64 start, u64 private);
258int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private); 234int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private);
259void set_page_extent_mapped(struct page *page); 235void set_page_extent_mapped(struct page *page);
260 236
261struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, 237struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
262 u64 start, unsigned long len, 238 u64 start, unsigned long len,
263 struct page *page0, 239 struct page *page0);
264 gfp_t mask);
265struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, 240struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
266 u64 start, unsigned long len, 241 u64 start, unsigned long len);
267 gfp_t mask);
268void free_extent_buffer(struct extent_buffer *eb); 242void free_extent_buffer(struct extent_buffer *eb);
269int read_extent_buffer_pages(struct extent_io_tree *tree, 243int read_extent_buffer_pages(struct extent_io_tree *tree,
270 struct extent_buffer *eb, u64 start, int wait, 244 struct extent_buffer *eb, u64 start, int wait,
@@ -292,16 +266,11 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset,
292 unsigned long src_offset, unsigned long len); 266 unsigned long src_offset, unsigned long len);
293void memset_extent_buffer(struct extent_buffer *eb, char c, 267void memset_extent_buffer(struct extent_buffer *eb, char c,
294 unsigned long start, unsigned long len); 268 unsigned long start, unsigned long len);
295int wait_on_extent_buffer_writeback(struct extent_io_tree *tree,
296 struct extent_buffer *eb);
297int wait_on_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end);
298int wait_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits); 269int wait_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits);
299int clear_extent_buffer_dirty(struct extent_io_tree *tree, 270int clear_extent_buffer_dirty(struct extent_io_tree *tree,
300 struct extent_buffer *eb); 271 struct extent_buffer *eb);
301int set_extent_buffer_dirty(struct extent_io_tree *tree, 272int set_extent_buffer_dirty(struct extent_io_tree *tree,
302 struct extent_buffer *eb); 273 struct extent_buffer *eb);
303int test_extent_buffer_dirty(struct extent_io_tree *tree,
304 struct extent_buffer *eb);
305int set_extent_buffer_uptodate(struct extent_io_tree *tree, 274int set_extent_buffer_uptodate(struct extent_io_tree *tree,
306 struct extent_buffer *eb); 275 struct extent_buffer *eb);
307int clear_extent_buffer_uptodate(struct extent_io_tree *tree, 276int clear_extent_buffer_uptodate(struct extent_io_tree *tree,
@@ -319,7 +288,6 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long offset,
319 unsigned long *map_start, 288 unsigned long *map_start,
320 unsigned long *map_len, int km); 289 unsigned long *map_len, int km);
321void unmap_extent_buffer(struct extent_buffer *eb, char *token, int km); 290void unmap_extent_buffer(struct extent_buffer *eb, char *token, int km);
322int release_extent_buffer_tail_pages(struct extent_buffer *eb);
323int extent_range_uptodate(struct extent_io_tree *tree, 291int extent_range_uptodate(struct extent_io_tree *tree,
324 u64 start, u64 end); 292 u64 start, u64 end);
325int extent_clear_unlock_delalloc(struct inode *inode, 293int extent_clear_unlock_delalloc(struct inode *inode,