summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-05-03 18:55:55 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-05-09 22:23:35 +0200
commit91ffdecfc796e79ce9d6ae1cf052afebbda8b01e (patch)
treeeee9a84e07ccd91e26d2e5e00a312e04eba97659 /fs
parentbcachefs: bch2_dev_get_ioref2(); journal_io.c (diff)
downloadlinux-91ffdecfc796e79ce9d6ae1cf052afebbda8b01e.tar.xz
linux-91ffdecfc796e79ce9d6ae1cf052afebbda8b01e.zip
bcachefs: bch2_dev_get_ioref2(); debug.c
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c
index b5aa4e5b224b..d75735aad27e 100644
--- a/fs/bcachefs/debug.c
+++ b/fs/bcachefs/debug.c
@@ -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_sorted = c->verify_data->data;
struct bset *sorted, *inmemory = &b->data->keys;
- struct bch_dev *ca = bch2_dev_bkey_exists(c, pick.ptr.dev);
struct bio *bio;
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;
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,
return;
}
- ca = bch2_dev_bkey_exists(c, pick.ptr.dev);
- if (!bch2_dev_get_ioref(ca, READ)) {
+ ca = bch2_dev_get_ioref2(c, pick.ptr.dev, READ);
+ if (!ca) {
prt_printf(out, "error getting device to read from: not online\n");
return;
}