diff options
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 40 |
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 | ||
154 | struct extent_map_tree; | 154 | struct extent_map_tree; |
155 | 155 | ||
156 | static 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 | |||
165 | typedef struct extent_map *(get_extent_t)(struct inode *inode, | 156 | typedef 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 | ||
171 | void extent_io_tree_init(struct extent_io_tree *tree, | 162 | void extent_io_tree_init(struct extent_io_tree *tree, |
172 | struct address_space *mapping, gfp_t mask); | 163 | struct address_space *mapping); |
173 | int try_release_extent_mapping(struct extent_map_tree *map, | 164 | int 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); |
216 | int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, | 207 | int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, |
217 | gfp_t mask); | 208 | gfp_t mask); |
218 | int clear_extent_ordered(struct extent_io_tree *tree, u64 start, u64 end, | ||
219 | gfp_t mask); | ||
220 | int clear_extent_ordered_metadata(struct extent_io_tree *tree, u64 start, | ||
221 | u64 end, gfp_t mask); | ||
222 | int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end, | 209 | int 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); |
224 | int set_extent_ordered(struct extent_io_tree *tree, u64 start, u64 end, | ||
225 | gfp_t mask); | ||
226 | int find_first_extent_bit(struct extent_io_tree *tree, u64 start, | 211 | int 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); |
228 | struct extent_state *find_first_extent_bit_state(struct extent_io_tree *tree, | 213 | struct 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); |
246 | int 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); | ||
249 | int extent_commit_write(struct extent_io_tree *tree, | ||
250 | struct inode *inode, struct page *page, | ||
251 | unsigned from, unsigned to); | ||
252 | sector_t extent_bmap(struct address_space *mapping, sector_t iblock, | ||
253 | get_extent_t *get_extent); | ||
254 | int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | 231 | int 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); |
256 | int set_range_dirty(struct extent_io_tree *tree, u64 start, u64 end); | ||
257 | int set_state_private(struct extent_io_tree *tree, u64 start, u64 private); | 233 | int set_state_private(struct extent_io_tree *tree, u64 start, u64 private); |
258 | int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private); | 234 | int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private); |
259 | void set_page_extent_mapped(struct page *page); | 235 | void set_page_extent_mapped(struct page *page); |
260 | 236 | ||
261 | struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, | 237 | struct 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); | ||
265 | struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, | 240 | struct 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); | ||
268 | void free_extent_buffer(struct extent_buffer *eb); | 242 | void free_extent_buffer(struct extent_buffer *eb); |
269 | int read_extent_buffer_pages(struct extent_io_tree *tree, | 243 | int 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); |
293 | void memset_extent_buffer(struct extent_buffer *eb, char c, | 267 | void memset_extent_buffer(struct extent_buffer *eb, char c, |
294 | unsigned long start, unsigned long len); | 268 | unsigned long start, unsigned long len); |
295 | int wait_on_extent_buffer_writeback(struct extent_io_tree *tree, | ||
296 | struct extent_buffer *eb); | ||
297 | int wait_on_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end); | ||
298 | int wait_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits); | 269 | int wait_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits); |
299 | int clear_extent_buffer_dirty(struct extent_io_tree *tree, | 270 | int clear_extent_buffer_dirty(struct extent_io_tree *tree, |
300 | struct extent_buffer *eb); | 271 | struct extent_buffer *eb); |
301 | int set_extent_buffer_dirty(struct extent_io_tree *tree, | 272 | int set_extent_buffer_dirty(struct extent_io_tree *tree, |
302 | struct extent_buffer *eb); | 273 | struct extent_buffer *eb); |
303 | int test_extent_buffer_dirty(struct extent_io_tree *tree, | ||
304 | struct extent_buffer *eb); | ||
305 | int set_extent_buffer_uptodate(struct extent_io_tree *tree, | 274 | int set_extent_buffer_uptodate(struct extent_io_tree *tree, |
306 | struct extent_buffer *eb); | 275 | struct extent_buffer *eb); |
307 | int clear_extent_buffer_uptodate(struct extent_io_tree *tree, | 276 | int 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); |
321 | void unmap_extent_buffer(struct extent_buffer *eb, char *token, int km); | 290 | void unmap_extent_buffer(struct extent_buffer *eb, char *token, int km); |
322 | int release_extent_buffer_tail_pages(struct extent_buffer *eb); | ||
323 | int extent_range_uptodate(struct extent_io_tree *tree, | 291 | int extent_range_uptodate(struct extent_io_tree *tree, |
324 | u64 start, u64 end); | 292 | u64 start, u64 end); |
325 | int extent_clear_unlock_delalloc(struct inode *inode, | 293 | int extent_clear_unlock_delalloc(struct inode *inode, |