/fs/btrfs/ |
D | volumes.c | 409 static void free_fs_devices(struct btrfs_fs_devices *fs_devices) in free_fs_devices() argument 413 WARN_ON(fs_devices->opened); in free_fs_devices() 414 while (!list_empty(&fs_devices->devices)) { in free_fs_devices() 415 device = list_entry(fs_devices->devices.next, in free_fs_devices() 420 kfree(fs_devices); in free_fs_devices() 425 struct btrfs_fs_devices *fs_devices; in btrfs_cleanup_fs_uuids() local 428 fs_devices = list_entry(fs_uuids.next, in btrfs_cleanup_fs_uuids() 430 list_del(&fs_devices->fs_list); in btrfs_cleanup_fs_uuids() 431 free_fs_devices(fs_devices); in btrfs_cleanup_fs_uuids() 438 struct btrfs_fs_devices *fs_devices; in find_fsid() local [all …]
|
D | dev-replace.c | 104 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace() 166 if (btrfs_find_device(fs_info->fs_devices, &args)) { in btrfs_init_dev_replace() 177 dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_init_dev_replace() 179 dev_replace->srcdev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_init_dev_replace() 219 WARN_ON(fs_info->fs_devices->rw_devices == 0); in btrfs_init_dev_replace() 253 if (srcdev->fs_devices->seeding) { in btrfs_init_dev_replace_tgtdev() 274 list_for_each_entry(device, &fs_info->fs_devices->devices, dev_list) { in btrfs_init_dev_replace_tgtdev() 324 device->fs_devices = fs_info->fs_devices; in btrfs_init_dev_replace_tgtdev() 330 mutex_lock(&fs_info->fs_devices->device_list_mutex); in btrfs_init_dev_replace_tgtdev() 331 list_add(&device->dev_list, &fs_info->fs_devices->devices); in btrfs_init_dev_replace_tgtdev() [all …]
|
D | sysfs.c | 897 fs_info->fs_devices->metadata_uuid); in btrfs_metadata_uuid_show() 984 struct btrfs_fs_devices *fs_devices = to_fs_devs(kobj); in btrfs_read_policy_show() local 989 if (fs_devices->read_policy == i) in btrfs_read_policy_show() 1008 struct btrfs_fs_devices *fs_devices = to_fs_devs(kobj); in btrfs_read_policy_store() local 1013 if (i != fs_devices->read_policy) { in btrfs_read_policy_store() 1014 fs_devices->read_policy = i; in btrfs_read_policy_store() 1015 btrfs_info(fs_devices->fs_info, in btrfs_read_policy_store() 1148 ret = sysfs_merge_group(&fs_info->fs_devices->fsid_kobj, in addrm_unknown_feature_attrs() 1153 sysfs_unmerge_group(&fs_info->fs_devices->fsid_kobj, in addrm_unknown_feature_attrs() 1197 static void btrfs_sysfs_remove_fs_devices(struct btrfs_fs_devices *fs_devices) in btrfs_sysfs_remove_fs_devices() argument [all …]
|
D | super.c | 1358 struct btrfs_fs_devices *fs_devices, in btrfs_fill_super() argument 1387 err = open_ctree(sb, fs_devices, (char *)data); in btrfs_fill_super() 1574 return fs_info->fs_devices == p->fs_devices; in btrfs_test_super() 1672 struct btrfs_fs_devices *fs_devices = NULL; in btrfs_mount_root() local 1723 fs_devices = device->fs_devices; in btrfs_mount_root() 1724 fs_info->fs_devices = fs_devices; in btrfs_mount_root() 1726 error = btrfs_open_devices(fs_devices, mode, fs_type); in btrfs_mount_root() 1731 if (!(flags & SB_RDONLY) && fs_devices->rw_devices == 0) { in btrfs_mount_root() 1736 bdev = fs_devices->latest_dev->bdev; in btrfs_mount_root() 1745 btrfs_close_devices(fs_devices); in btrfs_mount_root() [all …]
|
D | reada.c | 790 static int reada_start_for_fsdevs(struct btrfs_fs_devices *fs_devices) in reada_start_for_fsdevs() argument 798 list_for_each_entry(device, &fs_devices->devices, dev_list) { in reada_start_for_fsdevs() 811 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices, *seed_devs; in __reada_start_machine() local 815 mutex_lock(&fs_devices->device_list_mutex); in __reada_start_machine() 817 enqueued += reada_start_for_fsdevs(fs_devices); in __reada_start_machine() 818 list_for_each_entry(seed_devs, &fs_devices->seed_list, seed_list) in __reada_start_machine() 821 mutex_unlock(&fs_devices->device_list_mutex); in __reada_start_machine() 860 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in dump_devs() local 868 list_for_each_entry(device, &fs_devices->devices, dev_list) { in dump_devs()
|
D | check-integrity.h | 18 struct btrfs_fs_devices *fs_devices, 20 void btrfsic_unmount(struct btrfs_fs_devices *fs_devices);
|
D | disk-io.c | 350 ASSERT(memcmp_extent_buffer(eb, fs_info->fs_devices->metadata_uuid, in csum_one_extent_buffer() 474 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices, *seed_devs; in check_tree_block_fsid() local 486 metadata_uuid = fs_devices->metadata_uuid; in check_tree_block_fsid() 488 metadata_uuid = fs_devices->fsid; in check_tree_block_fsid() 493 list_for_each_entry(seed_devs, &fs_devices->seed_list, seed_list) in check_tree_block_fsid() 2243 struct btrfs_fs_devices *fs_devices) in btrfs_init_workqueues() argument 2355 struct btrfs_fs_devices *fs_devices) in btrfs_replay_log() argument 2363 if (fs_devices->rw_devices == 0) { in btrfs_replay_log() 2613 if (memcmp(fs_info->fs_devices->fsid, sb->fsid, BTRFS_FSID_SIZE) != 0) { in btrfs_validate_super() 2616 sb->fsid, fs_info->fs_devices->fsid); in btrfs_validate_super() [all …]
|
D | zoned.c | 308 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_get_dev_zone_info_all_devices() local 316 mutex_lock(&fs_devices->device_list_mutex); in btrfs_get_dev_zone_info_all_devices() 317 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_get_dev_zone_info_all_devices() 326 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_get_dev_zone_info_all_devices() 588 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_check_zoned_mode() local 598 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_check_zoned_mode() 685 fs_info->fs_devices->chunk_alloc_policy = BTRFS_CHUNK_ALLOC_ZONED; in btrfs_check_zoned_mode() 1641 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_free_zone_cache() local 1647 mutex_lock(&fs_devices->device_list_mutex); in btrfs_free_zone_cache() 1648 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_free_zone_cache() [all …]
|
D | volumes.h | 61 struct btrfs_fs_devices *fs_devices; member 494 int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, 499 void btrfs_close_devices(struct btrfs_fs_devices *fs_devices); 500 void btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices); 521 struct btrfs_device *btrfs_find_device(const struct btrfs_fs_devices *fs_devices,
|
D | scrub.c | 1504 struct btrfs_fs_devices *fs_devices = spage->dev->fs_devices; in scrub_check_fsid() local 1507 ret = memcmp(fsid, fs_devices->fsid, BTRFS_FSID_SIZE); in scrub_check_fsid() 3969 if (scrub_dev->fs_devices != fs_info->fs_devices) in scrub_supers() 4125 mutex_lock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev() 4126 dev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_scrub_dev() 4129 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev() 4136 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev() 4148 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev() 4159 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev() 4167 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev() [all …]
|
D | sysfs.h | 21 void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices);
|
D | check-integrity.c | 574 struct btrfs_fs_devices *fs_devices) in btrfsic_process_superblock() argument 577 struct list_head *dev_head = &fs_devices->devices; in btrfsic_process_superblock() 1659 if (memcmp(h->fsid, fs_info->fs_devices->fsid, BTRFS_FSID_SIZE)) in btrfsic_test_for_metadata() 2713 struct btrfs_fs_devices *fs_devices, in btrfsic_mount() argument 2718 struct list_head *dev_head = &fs_devices->devices; in btrfsic_mount() 2774 ret = btrfsic_process_superblock(state, fs_devices); in btrfsic_mount() 2777 btrfsic_unmount(fs_devices); in btrfsic_mount() 2790 void btrfsic_unmount(struct btrfs_fs_devices *fs_devices) in btrfsic_unmount() argument 2794 struct list_head *dev_head = &fs_devices->devices; in btrfsic_unmount()
|
D | disk-io.h | 58 struct btrfs_fs_devices *fs_devices,
|
D | ioctl.c | 412 sysfs_notify(&fs_info->fs_devices->fsid_kobj, NULL, "exclusive_operation"); in btrfs_exclop_finish() 454 list_for_each_entry_rcu(device, &fs_info->fs_devices->devices, in btrfs_ioctl_fitrim() 1720 device = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_ioctl_resize() 3364 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_ioctl_fs_info() local 3376 fi_args->num_devices = fs_devices->num_devices; in btrfs_ioctl_fs_info() 3378 list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) { in btrfs_ioctl_fs_info() 3384 memcpy(&fi_args->fsid, fs_devices->fsid, sizeof(fi_args->fsid)); in btrfs_ioctl_fs_info() 3401 memcpy(&fi_args->metadata_uuid, fs_devices->metadata_uuid, in btrfs_ioctl_fs_info() 3430 dev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_ioctl_dev_info()
|
D | block-group.c | 57 u64 num_devices = fs_info->fs_devices->rw_devices; in btrfs_reduce_alloc_profile() 2379 mutex_lock(&fs_info->fs_devices->device_list_mutex); in insert_dev_extents() 2389 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in insert_dev_extents() 3739 num_dev = fs_info->fs_devices->rw_devices; in get_profile_num_devs()
|
D | extent-tree.c | 4841 write_extent_buffer_fsid(buf, fs_info->fs_devices->metadata_uuid); in btrfs_init_new_buffer() 6055 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_trim_fs() local 6116 mutex_lock(&fs_devices->device_list_mutex); in btrfs_trim_fs() 6117 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_trim_fs() 6130 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_trim_fs()
|
D | ctree.c | 218 write_extent_buffer_fsid(cow, fs_info->fs_devices->metadata_uuid); in btrfs_copy_root() 434 write_extent_buffer_fsid(cow, fs_info->fs_devices->metadata_uuid); in __btrfs_cow_block()
|
D | ctree.h | 857 struct btrfs_fs_devices *fs_devices; member
|
D | extent_io.c | 3332 bdev = fs_info->fs_devices->latest_dev->bdev; in alloc_new_bio()
|
D | inode.c | 8149 iomap->bdev = fs_info->fs_devices->latest_dev->bdev; in btrfs_dio_iomap_begin()
|
/fs/btrfs/tests/ |
D | btrfs-tests.c | 105 list_add(&dev->dev_list, &fs_info->fs_devices->devices); in btrfs_alloc_dummy_device() 123 fs_info->fs_devices = kzalloc(sizeof(struct btrfs_fs_devices), in btrfs_alloc_dummy_fs_info() 125 if (!fs_info->fs_devices) { in btrfs_alloc_dummy_fs_info() 129 INIT_LIST_HEAD(&fs_info->fs_devices->devices); in btrfs_alloc_dummy_fs_info() 134 kfree(fs_info->fs_devices); in btrfs_alloc_dummy_fs_info() 187 list_for_each_entry_safe(dev, tmp, &fs_info->fs_devices->devices, in btrfs_free_dummy_fs_info() 196 kfree(fs_info->fs_devices); in btrfs_free_dummy_fs_info()
|