jbd2: add support for avoiding data writes during transaction commits
authorJan Kara <jack@suse.cz>
Sun, 24 Apr 2016 04:56:07 +0000 (00:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 24 Apr 2016 04:56:07 +0000 (00:56 -0400)
commit41617e1a8dec9fe082ba5dec26bacb154eb55482
treecad9847e725526c8af355f116ec5cf317dc2d24c
parent3957ef53a5033bd519b19cf375061be1929bdb5f
jbd2: add support for avoiding data writes during transaction commits

Currently when filesystem needs to make sure data is on permanent
storage before committing a transaction it adds inode to transaction's
inode list. During transaction commit, jbd2 writes back all dirty
buffers that have allocated underlying blocks and waits for the IO to
finish. However when doing writeback for delayed allocated data, we
allocate blocks and immediately submit the data. Thus asking jbd2 to
write dirty pages just unnecessarily adds more work to jbd2 possibly
writing back other redirtied blocks.

Add support to jbd2 to allow filesystem to ask jbd2 to only wait for
outstanding data writes before committing a transaction and thus avoid
unnecessary writes.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4_jbd2.h
fs/jbd2/commit.c
fs/jbd2/journal.c
fs/jbd2/transaction.c
fs/ocfs2/journal.h
include/linux/jbd2.h