Skip to content

Commit

Permalink
ext4: invalidate extent status tree during extent migration
Browse files Browse the repository at this point in the history
mext_replace_branches() will change inode's extents layout so
we have to drop corresponding cache.

TESTCASE:  301'th xfstest was not yet accepted to official xfstest's branch
and can be found here: https://github.com/dmonakhov/xfstests/commit/7b7efeee30a41109201e2040034e71db9b66ddc0

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Dmitry Monakhov authored and Theodore Ts'o committed Mar 4, 2013
1 parent de99fcc commit 6ca470d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fs/ext4/move_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,14 @@ mext_replace_branches(handle_t *handle, struct inode *orig_inode,
int replaced_count = 0;
int dext_alen;

*err = ext4_es_remove_extent(orig_inode, from, count);
if (*err)
goto out;

*err = ext4_es_remove_extent(donor_inode, from, count);
if (*err)
goto out;

/* Get the original extent for the block "orig_off" */
*err = get_ext_path(orig_inode, orig_off, &orig_path);
if (*err)
Expand Down

0 comments on commit 6ca470d

Please sign in to comment.