Lines Matching refs:dev_idx

1196 			bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx)->last_mount =  in bch2_fs_start()
1249 struct bch_member m = bch2_sb_member_get(sb, sb->dev_idx); in bch2_dev_may_add()
1271 if (!bch2_member_exists(fs->sb, sb->sb->dev_idx)) in bch2_dev_in_fs()
1314 struct bch_member m = bch2_sb_member_get(fs->sb, sb->sb->dev_idx); in bch2_dev_in_fs()
1355 clear_bit(ca->dev_idx, ca->fs->online_devs.d); in bch2_dev_io_ref_stop()
1460 ret = kobject_add(&ca->kobj, &c->kobj, "dev-%u", ca->dev_idx) ?: in bch2_dev_sysfs_online()
1535 unsigned dev_idx) in bch2_dev_attach() argument
1537 ca->dev_idx = dev_idx; in bch2_dev_attach()
1538 __set_bit(ca->dev_idx, ca->self.d); in bch2_dev_attach()
1541 scnprintf(ca->name, sizeof(ca->name), "dev-%u", dev_idx); in bch2_dev_attach()
1544 rcu_assign_pointer(c->devs[ca->dev_idx], ca); in bch2_dev_attach()
1550 static int bch2_dev_alloc(struct bch_fs *c, unsigned dev_idx) in bch2_dev_alloc() argument
1552 struct bch_member member = bch2_sb_member_get(c->disk_sb.sb, dev_idx); in bch2_dev_alloc()
1564 bch2_dev_attach(c, ca, dev_idx); in bch2_dev_alloc()
1576 sb->sb->dev_idx); in __bch2_dev_attach_bdev()
1627 BUG_ON(!bch2_dev_exists(c, sb->sb->dev_idx)); in bch2_dev_attach_bdev()
1629 ca = bch2_dev_locked(c, sb->sb->dev_idx); in bch2_dev_attach_bdev()
1635 set_bit(ca->dev_idx, c->online_devs.d); in bch2_dev_attach_bdev()
1690 __clear_bit(ca->dev_idx, new_online_devs.d); in bch2_dev_state_allowed()
1743 m = bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx); in __bch2_dev_set_state()
1773 unsigned dev_idx = ca->dev_idx, data; in bch2_dev_remove() local
1795 ? bch2_dev_data_drop_by_backpointers(c, ca->dev_idx, flags) in bch2_dev_remove()
1796 : (bch2_dev_data_drop(c, ca->dev_idx, flags) ?: in bch2_dev_remove()
1797 bch2_dev_remove_stripes(c, ca->dev_idx, flags)); in bch2_dev_remove()
1828 ret = bch2_journal_flush_device_pins(&c->journal, ca->dev_idx); in bch2_dev_remove()
1857 rcu_assign_pointer(c->devs[ca->dev_idx], NULL); in bch2_dev_remove()
1875 m = bch2_members_v2_get_mut(c->disk_sb.sb, dev_idx); in bch2_dev_remove()
1911 struct bch_member dev_mi = bch2_sb_member_get(sb.sb, sb.sb->dev_idx); in bch2_dev_add()
1966 unsigned dev_idx = ret; in bch2_dev_add() local
1972 *bch2_members_v2_get_mut(c->disk_sb.sb, dev_idx) = dev_mi; in bch2_dev_add()
1974 ca->disk_sb.sb->dev_idx = dev_idx; in bch2_dev_add()
1975 bch2_dev_attach(c, ca, dev_idx); in bch2_dev_add()
2054 unsigned dev_idx; in bch2_dev_online() local
2065 dev_idx = sb.sb->dev_idx; in bch2_dev_online()
2076 ca = bch2_dev_locked(c, dev_idx); in bch2_dev_online()
2101 bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx)->last_mount = in bch2_dev_online()
2143 .dev = ca->dev_idx, in __bch2_dev_resize_alloc()
2188 m = bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx); in bch2_dev_resize()
2227 bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx); in bch2_fs_resize_on_mount()