ext4: Mark pages with journalled data dirty
authorJan Kara <jack@suse.cz>
Wed, 29 Mar 2023 15:49:33 +0000 (17:49 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 14 Apr 2023 23:38:50 +0000 (19:38 -0400)
commitd84c9ebdac1e39bc7b036c0c829ee8c1956edabc
treea02e8fcdbc61cec1ad9a6206760b791b36d07e05
parentbd159398a2d2234de07d310132865706964aaaa7
ext4: Mark pages with journalled data dirty

Currently pages with journalled data written by write(2) or modified by
block zeroing during truncate(2) are not marked as dirty. They are
dirtied only once the transaction commits. This however makes writeback
code think inode has no pages to write and so ext4_writepages() is not
called to make pages with journalled data persistent. Mark pages with
journalled data dirty (similarly as it happens for writes through mmap)
so that writeback code knows about them and ext4_writepages() can do
what it needs to to the inode.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230329154950.19720-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c