]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: speedup jbd2_journal_dirty_metadata()
authorJan Kara <jack@suse.cz>
Sun, 21 Jun 2015 01:44:17 +0000 (21:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 21 Jun 2015 01:44:17 +0000 (21:44 -0400)
commit450875ea90dc62828fe51d373cae7db9a7a6d8ce
treea4cf50f078a0c94d76e363bedc7be91bde7125f6
parent65550b77d29699d3da5f5abc34e812cbe0d36122
jbd2: speedup jbd2_journal_dirty_metadata()

It is often the case that we mark buffer as having dirty metadata when
the buffer is already in that state (frequent for bitmaps, inode table
blocks, superblock). Thus it is unnecessary to contend on grabbing
journal head reference and bh_state lock. Avoid that by checking whether
any modification to the buffer is needed before grabbing any locks or
references.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/transaction.c