]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: Fix dirtying of journalled buffers in data=journal mode
authorJan Kara <jack@suse.cz>
Thu, 5 Aug 2010 18:41:42 +0000 (14:41 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 5 Aug 2010 18:41:42 +0000 (14:41 -0400)
commit2a49b845ffb8fc8c830981a5ff4a078b429fac06
tree8173b2de9f0f2b596812a725ac1897efa0ba38fc
parentfebcdac34c5938193f91b8e40721cf1520b3c3f2
ext4: Fix dirtying of journalled buffers in data=journal mode

In data=journal mode, we still use block_write_begin() to prepare
page for writing. This function can occasionally mark buffer dirty
which violates journalling assumptions - when a buffer is part of
a transaction, it should be dirty and a buffer can be already part
of a forget list of some transaction when block_write_begin()
gets called. This violation of journalling assumptions then results
in "JBD: Spotted dirty metadata buffer..." warnings.

In fact, temporary dirtying the buffer while the page is still locked
does not really cause problems to the journalling because we won't write
the buffer until the page gets unlocked. So we just have to make sure
to clear dirty bits before unlocking the page.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext4/inode.c