diff options
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/recovery.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index c269a7d29a46..01f744cb97a4 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -289,6 +289,8 @@ int jbd2_journal_recover(journal_t *journal) journal_superblock_t * sb; struct recovery_info info; + errseq_t wb_err; + struct address_space *mapping; memset(&info, 0, sizeof(info)); sb = journal->j_superblock; @@ -306,6 +308,9 @@ int jbd2_journal_recover(journal_t *journal) return 0; } + wb_err = 0; + mapping = journal->j_fs_dev->bd_inode->i_mapping; + errseq_check_and_advance(&mapping->wb_err, &wb_err); err = do_one_pass(journal, &info, PASS_SCAN); if (!err) err = do_one_pass(journal, &info, PASS_REVOKE); @@ -329,6 +334,9 @@ int jbd2_journal_recover(journal_t *journal) err2 = sync_blockdev(journal->j_fs_dev); if (!err) err = err2; + err2 = errseq_check_and_advance(&mapping->wb_err, &wb_err); + if (!err) + err = err2; /* Make sure all replayed data is on permanent storage */ if (journal->j_flags & JBD2_BARRIER) { err2 = blkdev_issue_flush(journal->j_fs_dev); @@ -632,7 +640,7 @@ static int do_one_pass(journal_t *journal, success = err; printk(KERN_ERR "JBD2: IO error %d recovering " - "block %ld in log\n", + "block %lu in log\n", err, io_block); } else { unsigned long long blocknr; @@ -661,7 +669,8 @@ static int do_one_pass(journal_t *journal, printk(KERN_ERR "JBD2: Invalid " "checksum recovering " "data block %llu in " - "log\n", blocknr); + "journal block %lu\n", + blocknr, io_block); block_error = 1; goto skip_write; } |