diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-03-12 21:38:03 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-03-12 21:38:03 +0100 |
commit | 66a4cb187b92ca8663203fe8fda621e6585a2a00 (patch) | |
tree | de342428a303fe10842e04b81514be5cf582f7db /fs/ext4/ext4_jbd2.c | |
parent | jbd2: minimize region locked by j_list_lock in jbd2_journal_forget() (diff) | |
download | linux-66a4cb187b92ca8663203fe8fda621e6585a2a00.tar.xz linux-66a4cb187b92ca8663203fe8fda621e6585a2a00.zip |
jbd2: improve error messages for inconsistent journal heads
Fix up error messages printed when the transaction pointers in a
journal head are inconsistent. This improves the error messages which
are printed when running xfstests generic/068 in data=journal mode.
See the bug report at: https://bugzilla.kernel.org/show_bug.cgi?id=60786
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4_jbd2.c')
-rw-r--r-- | fs/ext4/ext4_jbd2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 3fe29de832c8..c3fb607413ed 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -259,6 +259,16 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, if (WARN_ON_ONCE(err)) { ext4_journal_abort_handle(where, line, __func__, bh, handle, err); + if (inode == NULL) { + pr_err("EXT4: jbd2_journal_dirty_metadata " + "failed: handle type %u started at " + "line %u, credits %u/%u, errcode %d", + handle->h_type, + handle->h_line_no, + handle->h_requested_credits, + handle->h_buffer_credits, err); + return err; + } ext4_error_inode(inode, where, line, bh->b_blocknr, "journal_dirty_metadata failed: " |