• Home
  • Raw
  • Download

Lines Matching refs:device

986 	struct btrfs_device *device;  in btrfs_sysfs_remove_fs_devices()  local
989 list_for_each_entry(device, &fs_devices->devices, dev_list) in btrfs_sysfs_remove_fs_devices()
990 btrfs_sysfs_remove_device(device); in btrfs_sysfs_remove_fs_devices()
993 list_for_each_entry(device, &seed->devices, dev_list) in btrfs_sysfs_remove_fs_devices()
994 btrfs_sysfs_remove_device(device); in btrfs_sysfs_remove_fs_devices()
1233 void btrfs_sysfs_remove_device(struct btrfs_device *device) in btrfs_sysfs_remove_device() argument
1243 devices_kobj = device->fs_info->fs_devices->devices_kobj; in btrfs_sysfs_remove_device()
1246 if (device->bdev) { in btrfs_sysfs_remove_device()
1247 disk = device->bdev->bd_part; in btrfs_sysfs_remove_device()
1252 if (device->devid_kobj.state_initialized) { in btrfs_sysfs_remove_device()
1253 kobject_del(&device->devid_kobj); in btrfs_sysfs_remove_device()
1254 kobject_put(&device->devid_kobj); in btrfs_sysfs_remove_device()
1255 wait_for_completion(&device->kobj_unregister); in btrfs_sysfs_remove_device()
1264 struct btrfs_device *device = container_of(kobj, struct btrfs_device, in btrfs_devinfo_in_fs_metadata_show() local
1267 val = !!test_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state); in btrfs_devinfo_in_fs_metadata_show()
1277 struct btrfs_device *device = container_of(kobj, struct btrfs_device, in btrfs_devinfo_missing_show() local
1280 val = !!test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state); in btrfs_devinfo_missing_show()
1291 struct btrfs_device *device = container_of(kobj, struct btrfs_device, in btrfs_devinfo_replace_target_show() local
1294 val = !!test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state); in btrfs_devinfo_replace_target_show()
1304 struct btrfs_device *device = container_of(kobj, struct btrfs_device, in btrfs_devinfo_writeable_show() local
1307 val = !!test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state); in btrfs_devinfo_writeable_show()
1324 struct btrfs_device *device = container_of(kobj, struct btrfs_device, in btrfs_release_devid_kobj() local
1327 memset(&device->devid_kobj, 0, sizeof(struct kobject)); in btrfs_release_devid_kobj()
1328 complete(&device->kobj_unregister); in btrfs_release_devid_kobj()
1337 int btrfs_sysfs_add_device(struct btrfs_device *device) in btrfs_sysfs_add_device() argument
1348 devices_kobj = device->fs_info->fs_devices->devices_kobj; in btrfs_sysfs_add_device()
1349 devinfo_kobj = device->fs_info->fs_devices->devinfo_kobj; in btrfs_sysfs_add_device()
1355 if (device->bdev) { in btrfs_sysfs_add_device()
1359 disk = device->bdev->bd_part; in btrfs_sysfs_add_device()
1364 btrfs_warn(device->fs_info, in btrfs_sysfs_add_device()
1366 device->devid, ret); in btrfs_sysfs_add_device()
1371 init_completion(&device->kobj_unregister); in btrfs_sysfs_add_device()
1372 ret = kobject_init_and_add(&device->devid_kobj, &devid_ktype, in btrfs_sysfs_add_device()
1373 devinfo_kobj, "%llu", device->devid); in btrfs_sysfs_add_device()
1375 kobject_put(&device->devid_kobj); in btrfs_sysfs_add_device()
1376 btrfs_warn(device->fs_info, in btrfs_sysfs_add_device()
1378 device->devid, ret); in btrfs_sysfs_add_device()
1389 struct btrfs_device *device; in btrfs_sysfs_add_fs_devices() local
1392 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_sysfs_add_fs_devices()
1393 ret = btrfs_sysfs_add_device(device); in btrfs_sysfs_add_fs_devices()
1399 list_for_each_entry(device, &seed->devices, dev_list) { in btrfs_sysfs_add_fs_devices()
1400 ret = btrfs_sysfs_add_device(device); in btrfs_sysfs_add_fs_devices()
1439 void btrfs_sysfs_update_devid(struct btrfs_device *device) in btrfs_sysfs_update_devid() argument
1443 snprintf(tmp, sizeof(tmp), "%llu", device->devid); in btrfs_sysfs_update_devid()
1445 if (kobject_rename(&device->devid_kobj, tmp)) in btrfs_sysfs_update_devid()
1446 btrfs_warn(device->fs_devices->fs_info, in btrfs_sysfs_update_devid()
1448 device->devid); in btrfs_sysfs_update_devid()