]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: clear BH_Delay & BH_Unwritten in journal_unmap_buffer
authorEric Sandeen <sandeen@redhat.com>
Mon, 20 Feb 2012 22:53:01 +0000 (17:53 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 Feb 2012 22:53:01 +0000 (17:53 -0500)
commit6169fc296b5ceed9e12fc36279e68f36f2af1945
treec41a5da09a9a82ba19b11828ac725ea644454a27
parent8b8894a60a4231e474da389a26ac395df0309167
jbd2: clear BH_Delay & BH_Unwritten in journal_unmap_buffer

journal_unmap_buffer()'s zap_buffer: code clears a lot of buffer head
state ala discard_buffer(), but does not touch _Delay or _Unwritten as
discard_buffer() does.

This can be problematic in some areas of the ext4 code which assume
that if they have found a buffer marked unwritten or delay, then it's
a live one.  Perhaps those spots should check whether it is mapped
as well, but if jbd2 is going to tear down a buffer, let's really
tear it down completely.

Without this I get some fsx failures on sub-page-block filesystems
up until v3.2, at which point f8f86f5eb117b5bf3c5613b53efda5e91a96c170
and 6d1e97ec18668fe34d4761c0f20053fff8b3ddd6 make the failures go
away, because buried within that large change is some more flag
clearing.  I still think it's worth doing in jbd2, since
->invalidatepage leads here directly, and it's the right place
to clear away these flags.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/jbd2/transaction.c