]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf066e9d063cf461124e39556daad1ea16dd29aae
treecad9847e725526c8af355f116ec5cf317dc2d24c
parentf6e0896399f5e30a53fa694021cec98071593196
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