Lines Matching refs:dev

68 			struct bch_dev *ca = bch2_dev_rcu_noerror(c, f->dev);  in bch2_io_failures_to_text()
72 prt_printf(out, "(invalid device %u)", f->dev); in bch2_io_failures_to_text()
92 unsigned dev) in bch2_dev_io_failures() argument
97 if (i->dev == dev) in bch2_dev_io_failures()
107 struct bch_dev_io_failures *f = bch2_dev_io_failures(failed, p->ptr.dev); in bch2_mark_io_failure()
114 f->dev = p->ptr.dev; in bch2_mark_io_failure()
126 unsigned dev) in bch2_mark_btree_validate_failure() argument
128 struct bch_dev_io_failures *f = bch2_dev_io_failures(failed, dev); in bch2_mark_btree_validate_failure()
135 f->dev = dev; in bch2_mark_btree_validate_failure()
161 struct bch_dev *ca2 = bch2_dev_rcu(c, p2.ptr.dev); in ptr_better()
190 int dev) in bch2_bkey_pick_read_device() argument
217 if (dev >= 0 && p.ptr.dev != dev) in bch2_bkey_pick_read_device()
220 struct bch_dev *ca = bch2_dev_rcu_noerror(c, p.ptr.dev); in bch2_bkey_pick_read_device()
222 if (unlikely(!ca && p.ptr.dev != BCH_SB_MEMBER_INVALID)) { in bch2_bkey_pick_read_device()
224 int ret = bch2_dev_missing_bkey(c, k, p.ptr.dev); in bch2_bkey_pick_read_device()
234 unlikely(failed) ? bch2_dev_io_failures(failed, p.ptr.dev) : NULL; in bch2_bkey_pick_read_device()
416 lp.ptr.dev != rp.ptr.dev || in bch2_extent_merge()
423 struct bch_dev *ca = bch2_dev_rcu(c, lp.ptr.dev); in bch2_extent_merge()
819 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_desired_durability()
826 struct bch_dev *ca = bch2_dev_rcu(c, p->ptr.dev); in bch2_extent_ptr_durability()
856 if (p.ptr.dev < c->sb.nr_devices && c->devs[p.ptr.dev]) in bch2_bkey_durability_safe()
924 ptr->dev = BCH_SB_MEMBER_INVALID; in bch2_bkey_drop_ptr_noerror()
963 if (p.ptr.dev == ptr->dev && p.has_ec) { in bch2_bkey_drop_ptr()
964 ptr->dev = BCH_SB_MEMBER_INVALID; in bch2_bkey_drop_ptr()
989 void bch2_bkey_drop_device(struct bkey_s k, unsigned dev) in bch2_bkey_drop_device() argument
991 bch2_bkey_drop_ptrs(k, ptr, ptr->dev == dev); in bch2_bkey_drop_device()
994 void bch2_bkey_drop_device_noerror(struct bkey_s k, unsigned dev) in bch2_bkey_drop_device_noerror() argument
996 bch2_bkey_drop_ptrs_noerror(k, ptr, ptr->dev == dev); in bch2_bkey_drop_device_noerror()
999 const struct bch_extent_ptr *bch2_bkey_has_device_c(struct bkey_s_c k, unsigned dev) in bch2_bkey_has_device_c() argument
1004 if (ptr->dev == dev) in bch2_bkey_has_device_c()
1017 if (bch2_dev_in_target(c, ptr->dev, target) && in bch2_bkey_has_target()
1018 (ca = bch2_dev_rcu(c, ptr->dev)) && in bch2_bkey_has_target()
1034 if (p.ptr.dev == m.dev && in bch2_bkey_matches_ptr()
1062 if (p1.ptr.dev == p2.ptr.dev && in bch2_extents_match()
1104 if (p1.ptr.dev == p2.ptr.dev && in bch2_extent_has_ptr()
1118 if (target && !bch2_dev_in_target(c, ptr->dev, target)) in want_cached_ptr()
1121 struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev); in want_cached_ptr()
1135 unsigned drop_dev = ptr->dev; in bch2_extent_ptr_set_cached()
1163 if (ptr2->dev == drop_dev) in bch2_extent_ptr_set_cached()
1190 (!(ca = bch2_dev_rcu(c, ptr->dev)) || in bch2_extent_normalize()
1230 struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev); in bch2_extent_ptr_to_text()
1232 prt_printf(out, "ptr: %u:%llu gen %u%s", ptr->dev, in bch2_extent_ptr_to_text()
1240 ptr->dev, b, offset, ptr->gen); in bch2_extent_ptr_to_text()
1382 bkey_fsck_err_on(ptr != ptr2 && ptr->dev == ptr2->dev, in extent_ptr_validate()
1384 "multiple pointers to same device (%u)", ptr->dev); in extent_ptr_validate()
1388 struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev); in extent_ptr_validate()