diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2012-09-26 12:32:54 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-09-26 12:32:54 -0400 |
commit | f066055a3449f0e5b0ae4f3ceab4445bead47638 (patch) | |
tree | c9232f08e2594b5e7f877facc2069e67847960eb /fs/ext4/move_extent.c | |
parent | 03bd8b9b896c8e940f282f540e6b4de90d666b7c (diff) |
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
Diffstat (limited to 'fs/ext4/move_extent.c')
-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 df5cde5130c5..e2016f34b58f 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c | |||
@@ -1142,7 +1142,12 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp, | |||
1142 | orig_inode->i_ino, donor_inode->i_ino); | 1142 | orig_inode->i_ino, donor_inode->i_ino); |
1143 | return -EINVAL; | 1143 | return -EINVAL; |
1144 | } | 1144 | } |
1145 | 1145 | /* TODO: This is non obvious task to swap blocks for inodes with full | |
1146 | jornaling enabled */ | ||
1147 | if (ext4_should_journal_data(orig_inode) || | ||
1148 | ext4_should_journal_data(donor_inode)) { | ||
1149 | return -EINVAL; | ||
1150 | } | ||
1146 | /* Protect orig and donor inodes against a truncate */ | 1151 | /* Protect orig and donor inodes against a truncate */ |
1147 | mext_inode_double_lock(orig_inode, donor_inode); | 1152 | mext_inode_double_lock(orig_inode, donor_inode); |
1148 | 1153 | ||