[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230329125740.4127-1-jack@suse.cz>
Date: Wed, 29 Mar 2023 17:49:31 +0200
From: Jan Kara <jack@...e.cz>
To: Ted Tso <tytso@....edu>
Cc: <linux-ext4@...r.kernel.org>, Jan Kara <jack@...e.cz>
Subject: [PATCH 0/13 v1] ext4: Make ext4_writepages() write all journalled data
Hello,
These patches modify ext4 so that whenever inode with journalled data is
written back we make sure we writeout all the dirty data the inode has.
Previously this was not the case as pages with journalled data that were still
part of running (or committing) transaction appeared as clean to the writeback
code. As a result we can remove workarounds for inodes with journalled data
from multiple places.
In particular, we make sure a page is marked as dirty as soon as it has any
data to write (even though it is part of the running transaction) and in
ext4_writepages() we make sure appropriate transaction is committed (in
WB_SYNC_ALL mode) and then go writing back pages (effectively performing a
checkpoint for the inode). Thus after WB_SYNC_ALL writeback all pages for the
inode are guaranteed to be clean (providing there were no new pages dirtied)
the same way this is guaranteed for non-journaled data.
The downside of this change is that workloads that use journalled data and
frequently redirty pages and call fsync(2) will see more IO happening (more
pages will get checkpointed). But given low amount of users of data=journal
mode and their nature, I deem the code simplification worth it.
Honza
Powered by blists - more mailing lists