diff options
author | Eric Sandeen <sandeen@redhat.com> | 2012-02-20 17:53:01 -0500 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-04-05 09:09:34 +0300 |
commit | d3f5576840688f76fb93aec29a09fd887347b5cd (patch) | |
tree | a1c31a2d7907f796042008d5d2d5efdcabef99fc | |
parent | a6e9dd49814f608da0b1d52ccc3b4b18aa6a0a61 (diff) | |
download | kernel-mfld-blackbay-d3f5576840688f76fb93aec29a09fd887347b5cd.tar.gz kernel-mfld-blackbay-d3f5576840688f76fb93aec29a09fd887347b5cd.tar.bz2 kernel-mfld-blackbay-d3f5576840688f76fb93aec29a09fd887347b5cd.zip |
jbd2: clear BH_Delay & BH_Unwritten in journal_unmap_buffer
commit 15291164b22a357cb211b618adfef4fa82fc0de3 upstream.
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 4e96b2dbbf1d7e81f22047a50f862555a6cb87cb
and 189e868fa8fdca702eb9db9d8afc46b5cb9144c9 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/jbd2/transaction.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 2d7109414cd..9baa39ea6be 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1902,6 +1902,8 @@ zap_buffer_unlocked: clear_buffer_mapped(bh); clear_buffer_req(bh); clear_buffer_new(bh); + clear_buffer_delay(bh); + clear_buffer_unwritten(bh); bh->b_bdev = NULL; return may_free; } |