linux/fs/jbd2
Ross Zwisler 6ba0e7dc64 jbd2: introduce jbd2_inode dirty range scoping
Currently both journal_submit_inode_data_buffers() and
journal_finish_inode_data_buffers() operate on the entire address space
of each of the inodes associated with a given journal entry.  The
consequence of this is that if we have an inode where we are constantly
appending dirty pages we can end up waiting for an indefinite amount of
time in journal_finish_inode_data_buffers() while we wait for all the
pages under writeback to be written out.

The easiest way to cause this type of workload is do just dd from
/dev/zero to a file until it fills the entire filesystem.  This can
cause journal_finish_inode_data_buffers() to wait for the duration of
the entire dd operation.

We can improve this situation by scoping each of the inode dirty ranges
associated with a given transaction.  We do this via the jbd2_inode
structure so that the scoping is contained within jbd2 and so that it
follows the lifetime and locking rules for that structure.

This allows us to limit the writeback & wait in
journal_submit_inode_data_buffers() and
journal_finish_inode_data_buffers() respectively to the dirty range for
a given struct jdb2_inode, keeping us from waiting forever if the inode
in question is still being appended to.

Signed-off-by: Ross Zwisler <zwisler@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org
2019-06-20 17:24:56 -04:00
..
checkpoint.c jbd2: remove repeated assignments in __jbd2_log_wait_for_space() 2019-04-06 18:14:17 -04:00
commit.c jbd2: introduce jbd2_inode dirty range scoping 2019-06-20 17:24:56 -04:00
journal.c jbd2: introduce jbd2_inode dirty range scoping 2019-06-20 17:24:56 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
recovery.c jbd2: clarify bad journal block checksum message 2018-02-18 21:33:13 -05:00
revoke.c jbd2: fix potential double free 2019-05-10 21:15:47 -04:00
transaction.c jbd2: introduce jbd2_inode dirty range scoping 2019-06-20 17:24:56 -04:00