summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2022-12-07 12:27:11 +0100
committerTheodore Ts'o <tytso@mit.edu>2022-12-09 03:49:25 +0100
commit59205c8d4eaeeb85cf76eb1cb140283cf900412a (patch)
tree504d0907f17eef2bdf19aa4b6685ce329f1ab3bd /fs/ext4/inode.c
parentext4: move percpu_rwsem protection into ext4_writepages() (diff)
downloadlinux-59205c8d4eaeeb85cf76eb1cb140283cf900412a.tar.xz
linux-59205c8d4eaeeb85cf76eb1cb140283cf900412a.zip
ext4: switch to using ext4_do_writepages() for ordered data writeout
Use the standard writepages method (ext4_do_writepages()) to perform writeout of ordered data during journal commit. Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20221207112722.22220-8-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3aa01a9d4664..56f6ef52fe76 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2960,6 +2960,22 @@ static int ext4_writepages(struct address_space *mapping,
return ret;
}
+int ext4_normal_submit_inode_data_buffers(struct jbd2_inode *jinode)
+{
+ struct writeback_control wbc = {
+ .sync_mode = WB_SYNC_ALL,
+ .nr_to_write = LONG_MAX,
+ .range_start = jinode->i_dirty_start,
+ .range_end = jinode->i_dirty_end,
+ };
+ struct mpage_da_data mpd = {
+ .inode = jinode->i_vfs_inode,
+ .wbc = &wbc,
+ .can_map = 0,
+ };
+ return ext4_do_writepages(&mpd);
+}
+
static int ext4_dax_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{