Commit 1f626223 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: fix backpointer_to_text() when dev does not exist

Fixes:
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 816054f4
...@@ -68,9 +68,11 @@ void bch2_backpointer_to_text(struct printbuf *out, const struct bch_backpointer ...@@ -68,9 +68,11 @@ void bch2_backpointer_to_text(struct printbuf *out, const struct bch_backpointer
void bch2_backpointer_k_to_text(struct printbuf *out, struct bch_fs *c, struct bkey_s_c k) void bch2_backpointer_k_to_text(struct printbuf *out, struct bch_fs *c, struct bkey_s_c k)
{ {
if (bch2_dev_exists2(c, k.k->p.inode)) {
prt_str(out, "bucket="); prt_str(out, "bucket=");
bch2_bpos_to_text(out, bp_pos_to_bucket(c, k.k->p)); bch2_bpos_to_text(out, bp_pos_to_bucket(c, k.k->p));
prt_str(out, " "); prt_str(out, " ");
}
bch2_backpointer_to_text(out, bkey_s_c_to_backpointer(k).v); bch2_backpointer_to_text(out, bkey_s_c_to_backpointer(k).v);
} }
......
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