Lines Matching refs:dev_idx
1020 bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx)->last_mount = cpu_to_le64(now); in bch2_fs_start()
1076 struct bch_member m = bch2_sb_member_get(sb, sb->dev_idx); in bch2_dev_may_add()
1098 if (!bch2_member_exists(fs->sb, sb->sb->dev_idx)) in bch2_dev_in_fs()
1141 struct bch_member m = bch2_sb_member_get(fs->sb, sb->sb->dev_idx); in bch2_dev_in_fs()
1278 "dev-%u", ca->dev_idx); in bch2_dev_sysfs_online()
1352 unsigned dev_idx) in bch2_dev_attach() argument
1354 ca->dev_idx = dev_idx; in bch2_dev_attach()
1355 __set_bit(ca->dev_idx, ca->self.d); in bch2_dev_attach()
1356 scnprintf(ca->name, sizeof(ca->name), "dev-%u", dev_idx); in bch2_dev_attach()
1359 rcu_assign_pointer(c->devs[ca->dev_idx], ca); in bch2_dev_attach()
1365 static int bch2_dev_alloc(struct bch_fs *c, unsigned dev_idx) in bch2_dev_alloc() argument
1367 struct bch_member member = bch2_sb_member_get(c->disk_sb.sb, dev_idx); in bch2_dev_alloc()
1380 bch2_dev_attach(c, ca, dev_idx); in bch2_dev_alloc()
1394 sb->sb->dev_idx); in __bch2_dev_attach_bdev()
1432 BUG_ON(!bch2_dev_exists(c, sb->sb->dev_idx)); in bch2_dev_attach_bdev()
1434 ca = bch2_dev_locked(c, sb->sb->dev_idx); in bch2_dev_attach_bdev()
1502 __clear_bit(ca->dev_idx, new_online_devs.d); in bch2_dev_state_allowed()
1583 m = bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx); in __bch2_dev_set_state()
1613 unsigned dev_idx = ca->dev_idx, data; in bch2_dev_remove() local
1632 ret = bch2_dev_data_drop(c, ca->dev_idx, flags); in bch2_dev_remove()
1652 ret = bch2_journal_flush_device_pins(&c->journal, ca->dev_idx); in bch2_dev_remove()
1681 rcu_assign_pointer(c->devs[ca->dev_idx], NULL); in bch2_dev_remove()
1699 m = bch2_members_v2_get_mut(c->disk_sb.sb, dev_idx); in bch2_dev_remove()
1730 struct bch_member dev_mi = bch2_sb_member_get(sb.sb, sb.sb->dev_idx); in bch2_dev_add()
1775 unsigned dev_idx = ret; in bch2_dev_add() local
1780 *bch2_members_v2_get_mut(c->disk_sb.sb, dev_idx) = dev_mi; in bch2_dev_add()
1782 ca->disk_sb.sb->dev_idx = dev_idx; in bch2_dev_add()
1783 bch2_dev_attach(c, ca, dev_idx); in bch2_dev_add()
1840 unsigned dev_idx; in bch2_dev_online() local
1851 dev_idx = sb.sb->dev_idx; in bch2_dev_online()
1862 ca = bch2_dev_locked(c, dev_idx); in bch2_dev_online()
1887 bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx)->last_mount = in bch2_dev_online()
1962 m = bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx); in bch2_dev_resize()
1971 .dev_data_type.dev = ca->dev_idx, in bch2_dev_resize()