summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-19 21:29:01 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2022-11-19 21:29:01 -0500
commit505230a110904050c2b9ae1d57afef6678c4595c (patch)
tree67484a2c3ddb0dd6e87dadee5e8f3ecec91fd88b
parenteffa4c94326034c0005e9aa558216e8ff4d8b65a (diff)
Update bcachefs sources to 586e7c5498 bcachefs: Improve journal_read() logging
-rw-r--r--.bcachefs_revision2
-rw-r--r--libbcachefs/journal_io.c26
2 files changed, 11 insertions, 17 deletions
diff --git a/.bcachefs_revision b/.bcachefs_revision
index f460dd27..8bdba8c8 100644
--- a/.bcachefs_revision
+++ b/.bcachefs_revision
@@ -1 +1 @@
-4366ca365f2c7473939dd361852fff9a144cb5d0
+586e7c5498345c048985f6864f07ce36adde48be
diff --git a/libbcachefs/journal_io.c b/libbcachefs/journal_io.c
index fb7d0bfa..01150635 100644
--- a/libbcachefs/journal_io.c
+++ b/libbcachefs/journal_io.c
@@ -1107,7 +1107,6 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
struct bch_dev *ca;
unsigned iter;
struct printbuf buf = PRINTBUF;
- size_t keys = 0, entries = 0;
bool degraded = false;
u64 seq, last_seq = 0;
int ret = 0;
@@ -1138,7 +1137,8 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
if (jlist.ret)
return jlist.ret;
- *start_seq = 0;
+ *start_seq = 0;
+ *blacklist_seq = 0;
/*
* Find most recent flush entry, and ignore newer non flush entries -
@@ -1151,7 +1151,7 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
continue;
if (!*start_seq)
- *start_seq = le64_to_cpu(i->j.seq) + 1;
+ *blacklist_seq = *start_seq = le64_to_cpu(i->j.seq) + 1;
if (!JSET_NO_FLUSH(&i->j)) {
int write = READ;
@@ -1181,6 +1181,13 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
goto err;
}
+ bch_info(c, "journal read done, replaying entries %llu-%llu",
+ last_seq, *blacklist_seq - 1);
+
+ if (*start_seq != *blacklist_seq)
+ bch_info(c, "dropped unflushed entries %llu-%llu",
+ *blacklist_seq, *start_seq - 1);
+
/* Drop blacklisted entries and entries older than last_seq: */
genradix_for_each(&c->journal_entries, radix_iter, _i) {
i = *_i;
@@ -1253,8 +1260,6 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
}
genradix_for_each(&c->journal_entries, radix_iter, _i) {
- struct jset_entry *entry;
- struct bkey_i *k, *_n;
struct bch_replicas_padded replicas = {
.e.data_type = BCH_DATA_journal,
.e.nr_required = 1,
@@ -1304,18 +1309,7 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
if (ret)
goto err;
}
-
- for_each_jset_key(k, _n, entry, &i->j)
- keys++;
- entries++;
}
-
- bch_info(c, "journal read done, %zu keys in %zu entries, seq %llu",
- keys, entries, *start_seq);
-
- if (*start_seq != *blacklist_seq)
- bch_info(c, "dropped unflushed entries %llu-%llu",
- *blacklist_seq, *start_seq - 1);
err:
fsck_err:
printbuf_exit(&buf);