Commit 365f64f3 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Add verbose log messages for journal read

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent efe68e1d
...@@ -177,7 +177,11 @@ ...@@ -177,7 +177,11 @@
*/ */
#undef pr_fmt #undef pr_fmt
#ifdef __KERNEL__
#define pr_fmt(fmt) "bcachefs: %s() " fmt "\n", __func__ #define pr_fmt(fmt) "bcachefs: %s() " fmt "\n", __func__
#else
#define pr_fmt(fmt) "%s() " fmt "\n", __func__
#endif
#include <linux/backing-dev-defs.h> #include <linux/backing-dev-defs.h>
#include <linux/bug.h> #include <linux/bug.h>
......
...@@ -892,6 +892,7 @@ static void bch2_journal_read_device(struct closure *cl) ...@@ -892,6 +892,7 @@ static void bch2_journal_read_device(struct closure *cl)
struct journal_device *ja = struct journal_device *ja =
container_of(cl, struct journal_device, read); container_of(cl, struct journal_device, read);
struct bch_dev *ca = container_of(ja, struct bch_dev, journal); struct bch_dev *ca = container_of(ja, struct bch_dev, journal);
struct bch_fs *c = ca->fs;
struct journal_list *jlist = struct journal_list *jlist =
container_of(cl->parent, struct journal_list, cl); container_of(cl->parent, struct journal_list, cl);
struct journal_read_buf buf = { NULL, 0 }; struct journal_read_buf buf = { NULL, 0 };
...@@ -943,6 +944,7 @@ static void bch2_journal_read_device(struct closure *cl) ...@@ -943,6 +944,7 @@ static void bch2_journal_read_device(struct closure *cl)
ja->discard_idx = ja->dirty_idx_ondisk = ja->discard_idx = ja->dirty_idx_ondisk =
ja->dirty_idx = (ja->cur_idx + 1) % ja->nr; ja->dirty_idx = (ja->cur_idx + 1) % ja->nr;
out: out:
bch_verbose(c, "journal read done on device %s, ret %i", ca->name, ret);
kvpfree(buf.data, buf.size); kvpfree(buf.data, buf.size);
percpu_ref_put(&ca->io_ref); percpu_ref_put(&ca->io_ref);
closure_return(cl); closure_return(cl);
......
...@@ -1008,6 +1008,7 @@ int bch2_fs_recovery(struct bch_fs *c) ...@@ -1008,6 +1008,7 @@ int bch2_fs_recovery(struct bch_fs *c)
if (!c->sb.clean || c->opts.fsck || c->opts.keep_journal) { if (!c->sb.clean || c->opts.fsck || c->opts.keep_journal) {
struct journal_replay *i; struct journal_replay *i;
bch_verbose(c, "starting journal read");
ret = bch2_journal_read(c, &c->journal_entries, ret = bch2_journal_read(c, &c->journal_entries,
&blacklist_seq, &journal_seq); &blacklist_seq, &journal_seq);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment