1

bcachefs: pass bch_dev to read_from_stale_dirty_pointer()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-05-01 03:58:13 -04:00
parent 78e9b548f3
commit db39a35dde

View File

@ -758,11 +758,11 @@ err:
} }
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 @@ retry_pick:
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;
} }