Skip to content

Commit 91ffdec

Browse files
author
Kent Overstreet
committed
bcachefs: bch2_dev_get_ioref2(); debug.c
Signed-off-by: Kent Overstreet <[email protected]>
1 parent 6212ea2 commit 91ffdec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/bcachefs/debug.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ static bool bch2_btree_verify_replica(struct bch_fs *c, struct btree *b,
3737
struct btree_node *n_ondisk = c->verify_ondisk;
3838
struct btree_node *n_sorted = c->verify_data->data;
3939
struct bset *sorted, *inmemory = &b->data->keys;
40-
struct bch_dev *ca = bch2_dev_bkey_exists(c, pick.ptr.dev);
4140
struct bio *bio;
4241
bool failed = false, saw_error = false;
4342

44-
if (!bch2_dev_get_ioref(ca, READ))
43+
struct bch_dev *ca = bch2_dev_get_ioref2(c, pick.ptr.dev, READ);
44+
if (!ca)
4545
return false;
4646

4747
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,
194194
return;
195195
}
196196

197-
ca = bch2_dev_bkey_exists(c, pick.ptr.dev);
198-
if (!bch2_dev_get_ioref(ca, READ)) {
197+
ca = bch2_dev_get_ioref2(c, pick.ptr.dev, READ);
198+
if (!ca) {
199199
prt_printf(out, "error getting device to read from: not online\n");
200200
return;
201201
}

0 commit comments

Comments
 (0)