Commit 91ffdecf authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: bch2_dev_get_ioref2(); debug.c

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 6212ea24
...@@ -37,11 +37,11 @@ static bool bch2_btree_verify_replica(struct bch_fs *c, struct btree *b, ...@@ -37,11 +37,11 @@ static bool bch2_btree_verify_replica(struct bch_fs *c, struct btree *b,
struct btree_node *n_ondisk = c->verify_ondisk; struct btree_node *n_ondisk = c->verify_ondisk;
struct btree_node *n_sorted = c->verify_data->data; struct btree_node *n_sorted = c->verify_data->data;
struct bset *sorted, *inmemory = &b->data->keys; struct bset *sorted, *inmemory = &b->data->keys;
struct bch_dev *ca = bch2_dev_bkey_exists(c, pick.ptr.dev);
struct bio *bio; struct bio *bio;
bool failed = false, saw_error = false; bool failed = false, saw_error = false;
if (!bch2_dev_get_ioref(ca, READ)) struct bch_dev *ca = bch2_dev_get_ioref2(c, pick.ptr.dev, READ);
if (!ca)
return false; return false;
bio = bio_alloc_bioset(ca->disk_sb.bdev, bio = bio_alloc_bioset(ca->disk_sb.bdev,
...@@ -194,8 +194,8 @@ void bch2_btree_node_ondisk_to_text(struct printbuf *out, struct bch_fs *c, ...@@ -194,8 +194,8 @@ void bch2_btree_node_ondisk_to_text(struct printbuf *out, struct bch_fs *c,
return; return;
} }
ca = bch2_dev_bkey_exists(c, pick.ptr.dev); ca = bch2_dev_get_ioref2(c, pick.ptr.dev, READ);
if (!bch2_dev_get_ioref(ca, READ)) { if (!ca) {
prt_printf(out, "error getting device to read from: not online\n"); prt_printf(out, "error getting device to read from: not online\n");
return; return;
} }
......
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