diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-03-12 16:38:03 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-03-12 16:38:03 -0400 |
commit | 66a4cb187b92ca8663203fe8fda621e6585a2a00 (patch) | |
tree | de342428a303fe10842e04b81514be5cf582f7db /fs/ext4 | |
parent | 0bfea8118d8e4f6aeb476511350d649e8dcb0ce8 (diff) | |
download | linux-66a4cb187b92ca8663203fe8fda621e6585a2a00.tar.bz2 |
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')
-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: " |