]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commit
jbd2: cleanup journal tail after transaction commit
authorJan Kara <jack@suse.cz>
Wed, 14 Mar 2012 02:45:38 +0000 (22:45 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 14 Mar 2012 02:45:38 +0000 (22:45 -0400)
commit3339578f05787259917788f461f4196b7349c2a4
tree8e05b11eecd98e49076057940fc161f5b867b55c
parent932bb305ba2a01cd62809644d569f004e77a4355
jbd2: cleanup journal tail after transaction commit

Normally, we have to issue a cache flush before we can update journal tail in
journal superblock, effectively wiping out old transactions from the journal.
So use the fact that during transaction commit we issue cache flush anyway and
opportunistically push journal tail as far as we can. Since update of journal
superblock is still costly (we have to use WRITE_FUA), we update log tail only
if we can free significant amount of space.

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