diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2012-09-26 12:32:54 -0400 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2013-06-10 11:43:13 +0200 |
commit | e5180af75740e7239c37e1f63d5a67535209dae5 (patch) | |
tree | ca5df09c6660aaca76898127666fb8c32e12c879 /fs/ext4 | |
parent | 5d0735ba9c2f8a2e2b03b33bfa1de1840209d2e9 (diff) |
ext4: online defrag is not supported for journaled files
commit f066055a3449f0e5b0ae4f3ceab4445bead47638 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/move_extent.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index fe81390a65b8..da25617cd203 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -1208,7 +1208,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 */ ret1 = mext_inode_double_lock(orig_inode, donor_inode); if (ret1 < 0) |