Skip to content

Commit

Permalink
ext4: online defrag is not supported for journaled files
Browse files Browse the repository at this point in the history
Proper block swap for inodes with full journaling enabled is
truly non obvious task. In order to be on a safe side let's
explicitly disable it for now.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
  • Loading branch information
Dmitry Monakhov authored and Theodore Ts'o committed Sep 26, 2012
1 parent 03bd8b9 commit f066055
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/ext4/move_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,12 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp,
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}

/* TODO: This is non obvious task to swap blocks for inodes with full
jornaling enabled */
if (ext4_should_journal_data(orig_inode) ||
ext4_should_journal_data(donor_inode)) {
return -EINVAL;
}
/* Protect orig and donor inodes against a truncate */
mext_inode_double_lock(orig_inode, donor_inode);

Expand Down

0 comments on commit f066055

Please sign in to comment.