ext4: online defrag is not supported for journaled files
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
This commit is contained in:
parent
03bd8b9b89
commit
f066055a34
1 changed files with 6 additions and 1 deletions
|
@ -1142,7 +1142,12 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp,
|
||||||
orig_inode->i_ino, donor_inode->i_ino);
|
orig_inode->i_ino, donor_inode->i_ino);
|
||||||
return -EINVAL;
|
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 */
|
/* Protect orig and donor inodes against a truncate */
|
||||||
mext_inode_double_lock(orig_inode, donor_inode);
|
mext_inode_double_lock(orig_inode, donor_inode);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue