summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-01-04 19:05:08 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:21 -0400
commit03ea3962ab99adf0cf7de9949716e6baeda230f3 (patch)
tree1d1a8140f3b43772591ad33ffd49a0b76d7b8b55 /fs/bcachefs/recovery.c
parent57cfdd8b54b945fe80191767e36595b46893e5e0 (diff)
downloadlwn-03ea3962ab99adf0cf7de9949716e6baeda230f3.tar.gz
lwn-03ea3962ab99adf0cf7de9949716e6baeda230f3.zip
bcachefs: Log & error message improvements
- Add a shim uuid_unparse_lower() in the kernel, since %pU doesn't work in userspace - We don't need to print the bcachefs: or the filesystem name prefix in userspace - Improve a few error messages Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index d11457c229ac..7003cf77fdcd 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -530,10 +530,8 @@ static int bch2_journal_replay(struct bch_fs *c)
sizeof(keys_sorted[0]),
journal_sort_seq_cmp, NULL);
- if (keys->nr) {
- bch_verbose(c, "starting journal replay, %zu keys", keys->nr);
+ if (keys->nr)
replay_now_at(j, keys->journal_seq_base);
- }
for (i = 0; i < keys->nr; i++) {
k = keys_sorted[i];
@@ -901,7 +899,6 @@ static int bch2_fs_initialize_subvolumes(struct bch_fs *c)
static int bch2_fs_upgrade_for_subvolumes(struct btree_trans *trans)
{
- struct bch_fs *c = trans->c;
struct btree_iter iter;
struct bkey_s_c k;
struct bch_inode_unpacked inode;
@@ -915,7 +912,7 @@ static int bch2_fs_upgrade_for_subvolumes(struct btree_trans *trans)
goto err;
if (!bkey_is_inode(k.k)) {
- bch_err(c, "root inode not found");
+ bch_err(trans->c, "root inode not found");
ret = -ENOENT;
goto err;
}
@@ -1138,7 +1135,7 @@ use_clean:
if (c->opts.norecovery)
goto out;
- bch_verbose(c, "starting journal replay");
+ bch_verbose(c, "starting journal replay, %zu keys", c->journal_keys.nr);
err = "journal replay failed";
ret = bch2_journal_replay(c);
if (ret)