Messages in this thread Patch in this message | | | Date | Sat, 20 Nov 2004 00:13:05 GMT | From | Stephen Tweedie <> | Subject | [Patch 1/3]: ext3: cleanup handling of aborted transactions. |
| |
This patch improves ext3's error loggin when we encounter an on-disk corruption. Previously, a transaction (such as a truncate) which encountered many corruptions (eg. a single highly-corrupt indirect block) would emit copious "aborting transaction" errors to the log.
Even worse, encountering an aborted journal can count as such an error, leading to a flood of spurious "aborting transaction: Journal has aborted" errors.
With the fix, only emit that message on the first error. The patch also restores a missing \n in that printk path.
Signed-off-by: Stephen Tweedie <sct@redhat.com>
--- linux-2.6-ext3/fs/ext3/super.c.=K0000=.orig +++ linux-2.6-ext3/fs/ext3/super.c @@ -108,14 +108,19 @@ void ext3_journal_abort_handle(const cha char nbuf[16]; const char *errstr = ext3_decode_error(NULL, err, nbuf); - printk(KERN_ERR "%s: aborting transaction: %s in %s", - caller, errstr, err_fn); - if (bh) BUFFER_TRACE(bh, "abort"); - journal_abort_handle(handle); + if (!handle->h_err) handle->h_err = err; + + if (is_handle_aborted(handle)) + return; + + printk(KERN_ERR "%s: aborting transaction: %s in %s\n", + caller, errstr, err_fn); + + journal_abort_handle(handle); } /* Deal with the reporting of failure conditions on a filesystem such as - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |