linux-stable/include
Ross Zwisler 4384cd4bb0 jbd2: introduce jbd2_inode dirty range scoping
commit 6ba0e7dc64 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-31 07:28:47 +02:00
..
acpi ACPICA: Reference Counts: increase max to 0x4000 for large servers 2019-03-19 13:13:21 +01:00
asm-generic futex: Update comments and docs about return values of arch futex code 2019-07-03 13:16:03 +02:00
clocksource
crypto crypto: vmac - separate tfm and request context 2018-08-17 21:01:10 +02:00
drm drm: don't block fb changes for async plane updates 2019-06-15 11:55:00 +02:00
dt-bindings
keys keys: Fix dependency loop between construction record and auth key 2019-03-23 14:35:14 +01:00
kvm
linux jbd2: introduce jbd2_inode dirty range scoping 2019-07-31 07:28:47 +02:00
math-emu
media media: cec: make cec_get_edid_spa_location() an inline function 2019-05-16 19:42:26 +02:00
memory
misc
net tcp: fix tcp_set_congestion_control() use from bpf hook 2019-07-31 07:28:46 +02:00
pcmcia
ras
rdma IB/rxe: Revise the ib_wr_opcode enum 2019-05-16 19:42:25 +02:00
scsi scsi: fcoe: make use of fip_mode enum complete 2019-04-05 22:31:31 +02:00
soc memory: tegra: Apply interrupts mask per SoC 2018-08-03 07:50:38 +02:00
sound ALSA: compress: Fix stop handling on compressed capture streams 2019-02-12 19:46:11 +01:00
target
trace sched, trace: Fix prev_state output in sched_switch tracepoint 2019-02-20 10:20:55 +01:00
uapi nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header 2019-07-21 09:04:16 +02:00
video udlfb: set optimal write delay 2018-09-09 19:56:01 +02:00
xen xen/events: fix binding user event channels to cpus 2019-07-31 07:28:39 +02:00