Skip to content

Commit b3c7fd3

Browse files
author
Kent Overstreet
committed
bcachefs: On emergency shutdown, print out current journal sequence number
Signed-off-by: Kent Overstreet <[email protected]>
1 parent eab3a3c commit b3c7fd3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/bcachefs/error.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include "bcachefs.h"
33
#include "error.h"
4+
#include "journal.h"
45
#include "recovery_passes.h"
56
#include "super.h"
67
#include "thread_with_file.h"
@@ -16,7 +17,8 @@ bool bch2_inconsistent_error(struct bch_fs *c)
1617
return false;
1718
case BCH_ON_ERROR_ro:
1819
if (bch2_fs_emergency_read_only(c))
19-
bch_err(c, "inconsistency detected - emergency read only");
20+
bch_err(c, "inconsistency detected - emergency read only at journal seq %llu",
21+
journal_cur_seq(&c->journal));
2022
return true;
2123
case BCH_ON_ERROR_panic:
2224
panic(bch2_fmt(c, "panic after error"));

0 commit comments

Comments
 (0)