summaryrefslogtreecommitdiffstats
path: root/fs/ext4/move_extent.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-04-24 06:56:08 +0200
committerTheodore Ts'o <tytso@mit.edu>2016-04-24 06:56:08 +0200
commitee0876bc69ee8d24d524fb2e9e41e3682aaebb11 (patch)
tree4a3b6725cf029b704f47018ff8fbce41a84be1b3 /fs/ext4/move_extent.c
parentjbd2: add support for avoiding data writes during transaction commits (diff)
downloadlinux-ee0876bc69ee8d24d524fb2e9e41e3682aaebb11.tar.xz
linux-ee0876bc69ee8d24d524fb2e9e41e3682aaebb11.zip
ext4: do not ask jbd2 to write data for delalloc buffers
Currently we ask jbd2 to write all dirty allocated buffers before committing a transaction when doing writeback of delay allocated blocks. However this is unnecessary since we move all pages to writeback state before dropping a transaction handle and then submit all the necessary IO. We still need the transaction commit to wait for all the outstanding writeback before flushing disk caches during transaction commit to avoid data exposure issues though. Use the new jbd2 capability and ask it to only wait for outstanding writeback during transaction commit when writing back data in ext4_writepages(). Tested-by: "HUANG Weller (CM/ESW12-CN)" <Weller.Huang@cn.bosch.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/move_extent.c')
-rw-r--r--fs/ext4/move_extent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 325cef48b39a..a920c5d29fac 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -400,7 +400,7 @@ data_copy:
/* Even in case of data=writeback it is reasonable to pin
* inode to transaction, to prevent unexpected data loss */
- *err = ext4_jbd2_file_inode(handle, orig_inode);
+ *err = ext4_jbd2_inode_add_write(handle, orig_inode);
unlock_pages:
unlock_page(pagep[0]);