diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2014-08-31 05:52:19 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-08-31 05:52:19 +0200 |
commit | fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a (patch) | |
tree | 008646f85f1b0b5cb2307c3c676eee431ac4ac29 /fs/ext4/ext4.h | |
parent | ext4: use ext4_ext_next_allocated_block instead of mext_next_extent (diff) | |
download | linux-fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a.tar.xz linux-fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a.zip |
ext4: refactor ext4_move_extents code base
ext4_move_extents is too complex for review. It has duplicate almost
each function available in the rest of other codebase. It has useless
artificial restriction orig_offset == donor_offset. But in fact logic
of ext4_move_extents is very simple:
Iterate extents one by one (similar to ext4_fill_fiemap_extents)
->Iterate each page covered extent (similar to generic_perform_write)
->swap extents for covered by page (can be shared with IOC_MOVE_DATA)
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 420c9be9f7ae..cf3ad75d3015 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2740,10 +2740,15 @@ extern int ext4_find_delalloc_range(struct inode *inode, ext4_lblk_t lblk_start, ext4_lblk_t lblk_end); extern int ext4_find_delalloc_cluster(struct inode *inode, ext4_lblk_t lblk); +extern ext4_lblk_t ext4_ext_next_allocated_block(struct ext4_ext_path *path); extern int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, __u64 start, __u64 len); extern int ext4_ext_precache(struct inode *inode); extern int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len); +extern int ext4_swap_extents(handle_t *handle, struct inode *inode1, + struct inode *inode2, ext4_lblk_t lblk1, + ext4_lblk_t lblk2, ext4_lblk_t count, + int mark_unwritten,int *err); /* move_extent.c */ extern void ext4_double_down_write_data_sem(struct inode *first, |