bcachefs: Don't list non journal devs in journal_debug_to_text()
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 19 Mar 2021 20:30:01 +0000 (16:30 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:56 +0000 (17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal.c

index d5bbbf619359a7a15f0af9de5d9b9b1ba0537589..22069c277c15c83a14b187d4c14964d687661168 100644 (file)
@@ -1236,6 +1236,9 @@ void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
                                   &c->rw_devs[BCH_DATA_journal]) {
                struct journal_device *ja = &ca->journal;
 
+               if (!test_bit(ca->dev_idx, c->rw_devs[BCH_DATA_journal].d))
+                       continue;
+
                if (!ja->nr)
                        continue;