]> www.infradead.org Git - users/hch/block.git/commitdiff
bcachefs: On emergency shutdown, print out current journal sequence number
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 30 Mar 2024 19:59:57 +0000 (15:59 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Apr 2024 05:07:24 +0000 (01:07 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/error.c

index f942a3947496284bd9b916615962c4f19ff8e1a2..82a6656c941c5f16e6725d0bfbf66a3b63157e0f 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "bcachefs.h"
 #include "error.h"
+#include "journal.h"
 #include "recovery_passes.h"
 #include "super.h"
 #include "thread_with_file.h"
@@ -16,7 +17,8 @@ bool bch2_inconsistent_error(struct bch_fs *c)
                return false;
        case BCH_ON_ERROR_ro:
                if (bch2_fs_emergency_read_only(c))
-                       bch_err(c, "inconsistency detected - emergency read only");
+                       bch_err(c, "inconsistency detected - emergency read only at journal seq %llu",
+                               journal_cur_seq(&c->journal));
                return true;
        case BCH_ON_ERROR_panic:
                panic(bch2_fmt(c, "panic after error"));