]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: speedup jbd2_journal_dirty_metadata()
authorJan Kara <jack@suse.cz>
Sun, 12 Jul 2015 22:11:30 +0000 (18:11 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 12 Jul 2015 22:11:30 +0000 (18:11 -0400)
commit8d167e725460ff5d55ffc7fa36f60f732d371814
tree7a8fd3e3ccbb6d65bb420ddc48454cb5a72efb5c
parent9f982bb1128a7f4215b5eb0c7b858c42c74a38d9
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.

[ Note: this is a fixed version of commit 3edbf70611553, which was
  reverted in 6e22565645ebf51 due to a false positive triggering of an
  assertion check. -- Ted ]

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