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>
This commit is contained in:
@@ -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: "
|
||||
|
Reference in New Issue
Block a user