Skip to content

Commit 62ec170

Browse files
Zhihao Chengtytso
authored andcommitted
jbd2: replace journal state flag by checking errseq
Now JBD2 detects metadata writeback error of fs dev according to errseq. Replace journal state flag by checking errseq. Signed-off-by: Zhihao Cheng <[email protected]> Suggested-by: Jan Kara <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 990b6b5 commit 62ec170

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/jbd2/journal.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ int jbd2_journal_update_sb_log_tail(journal_t *journal, tid_t tail_tid,
18621862

18631863
if (is_journal_aborted(journal))
18641864
return -EIO;
1865-
if (test_bit(JBD2_CHECKPOINT_IO_ERROR, &journal->j_atomic_flags)) {
1865+
if (jbd2_check_fs_dev_write_error(journal)) {
18661866
jbd2_journal_abort(journal, -EIO);
18671867
return -EIO;
18681868
}
@@ -2160,12 +2160,12 @@ int jbd2_journal_destroy(journal_t *journal)
21602160

21612161
/*
21622162
* OK, all checkpoint transactions have been checked, now check the
2163-
* write out io error flag and abort the journal if some buffer failed
2164-
* to write back to the original location, otherwise the filesystem
2165-
* may become inconsistent.
2163+
* writeback errseq of fs dev and abort the journal if some buffer
2164+
* failed to write back to the original location, otherwise the
2165+
* filesystem may become inconsistent.
21662166
*/
21672167
if (!is_journal_aborted(journal) &&
2168-
test_bit(JBD2_CHECKPOINT_IO_ERROR, &journal->j_atomic_flags))
2168+
jbd2_check_fs_dev_write_error(journal))
21692169
jbd2_journal_abort(journal, -EIO);
21702170

21712171
if (journal->j_sb_buffer) {

0 commit comments

Comments
 (0)