Commit db39a35d authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: pass bch_dev to read_from_stale_dirty_pointer()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 78e9b548
...@@ -758,11 +758,11 @@ int __bch2_read_indirect_extent(struct btree_trans *trans, ...@@ -758,11 +758,11 @@ int __bch2_read_indirect_extent(struct btree_trans *trans,
} }
static noinline void read_from_stale_dirty_pointer(struct btree_trans *trans, static noinline void read_from_stale_dirty_pointer(struct btree_trans *trans,
struct bch_dev *ca,
struct bkey_s_c k, struct bkey_s_c k,
struct bch_extent_ptr ptr) struct bch_extent_ptr ptr)
{ {
struct bch_fs *c = trans->c; struct bch_fs *c = trans->c;
struct bch_dev *ca = bch2_dev_bkey_exists(c, ptr.dev);
struct btree_iter iter; struct btree_iter iter;
struct printbuf buf = PRINTBUF; struct printbuf buf = PRINTBUF;
int ret; int ret;
...@@ -842,7 +842,7 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig, ...@@ -842,7 +842,7 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig,
if ((flags & BCH_READ_IN_RETRY) && if ((flags & BCH_READ_IN_RETRY) &&
!pick.ptr.cached && !pick.ptr.cached &&
unlikely(dev_ptr_stale(ca, &pick.ptr))) { unlikely(dev_ptr_stale(ca, &pick.ptr))) {
read_from_stale_dirty_pointer(trans, k, pick.ptr); read_from_stale_dirty_pointer(trans, ca, k, pick.ptr);
bch2_mark_io_failure(failed, &pick); bch2_mark_io_failure(failed, &pick);
goto retry_pick; goto retry_pick;
} }
......
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