Home
last modified time | relevance | path

Searched refs:fs_devices (Results 1 – 13 of 13) sorted by relevance

/linux/fs/btrfs/
H A Dvolumes.c418 static void free_fs_devices(struct btrfs_fs_devices *fs_devices) in free_fs_devices() argument
422 WARN_ON(fs_devices->opened); in free_fs_devices()
423 WARN_ON(fs_devices->holding); in free_fs_devices()
424 while (!list_empty(&fs_devices->devices)) { in free_fs_devices()
425 device = list_first_entry(&fs_devices->devices, in free_fs_devices()
430 kfree(fs_devices); in free_fs_devices()
435 struct btrfs_fs_devices *fs_devices; in btrfs_cleanup_fs_uuids() local
438 fs_devices = list_first_entry(&fs_uuids, struct btrfs_fs_devices, in btrfs_cleanup_fs_uuids()
440 list_del(&fs_devices->fs_list); in btrfs_cleanup_fs_uuids()
441 free_fs_devices(fs_devices); in btrfs_cleanup_fs_uuids()
[all …]
H A Dsysfs.c778 if (!fs_info->fs_devices) in btrfs_chunk_size_store()
797 val = min(mult_perc(fs_info->fs_devices->total_rw_bytes, 10), val); in btrfs_chunk_size_store()
1248 return sysfs_emit(buf, "%pU\n", fs_info->fs_devices->metadata_uuid); in btrfs_metadata_uuid_show()
1318 return sysfs_emit(buf, "%d\n", fs_info->fs_devices->temp_fsid); in btrfs_temp_fsid_show()
1394 struct btrfs_fs_devices *fs_devices = to_fs_devs(kobj); in btrfs_read_policy_show() local
1395 const enum btrfs_read_policy policy = READ_ONCE(fs_devices->read_policy); in btrfs_read_policy_show()
1411 READ_ONCE(fs_devices->rr_min_contig_read)); in btrfs_read_policy_show()
1415 READ_ONCE(fs_devices->read_devid)); in btrfs_read_policy_show()
1430 struct btrfs_fs_devices *fs_devices = to_fs_devs(kobj); in btrfs_read_policy_store() local
1440 if (fs_devices->read_policy == BTRFS_READ_POLICY_RR && index != BTRFS_READ_POLICY_RR) in btrfs_read_policy_store()
[all …]
H A Ddisk-io.c288 ASSERT(memcmp_extent_buffer(eb, fs_info->fs_devices->metadata_uuid, in btree_csum_one_bio()
334 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices, *seed_devs; in check_tree_block_fsid() local
346 if (memcmp(fsid, fs_info->fs_devices->metadata_uuid, BTRFS_FSID_SIZE) == 0) in check_tree_block_fsid()
349 list_for_each_entry(seed_devs, &fs_devices->seed_list, seed_list) in check_tree_block_fsid()
1204 if (fs_info->fs_devices) in btrfs_free_fs_info()
1205 btrfs_close_devices(fs_info->fs_devices); in btrfs_free_fs_info()
2004 struct btrfs_fs_devices *fs_devices) in btrfs_replay_log() argument
2013 if (unlikely(fs_devices->rw_devices == 0)) { in btrfs_replay_log()
2455 if (unlikely(!fs_info->fs_devices->temp_fsid && in btrfs_validate_super()
2456 memcmp(fs_info->fs_devices->fsid, sb->fsid, BTRFS_FSID_SIZE) != 0)) { in btrfs_validate_super()
[all …]
H A Dzoned.c332 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_get_dev_zone_info_all_devices() local
344 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_get_dev_zone_info_all_devices()
680 list_for_each_entry(device, &fs_info->fs_devices->devices, dev_list) { in btrfs_check_for_zoned_device()
708 list_for_each_entry(device, &fs_info->fs_devices->devices, dev_list) { in btrfs_check_zoned_mode()
768 fs_info->fs_devices->chunk_alloc_policy = BTRFS_CHUNK_ALLOC_ZONED; in btrfs_check_zoned_mode()
2632 bool btrfs_can_activate_zone(struct btrfs_fs_devices *fs_devices, u64 flags) in btrfs_can_activate_zone() argument
2634 struct btrfs_fs_info *fs_info = fs_devices->fs_info; in btrfs_can_activate_zone()
2647 list_for_each_entry(device, &fs_devices->alloc_list, dev_alloc_list) { in btrfs_can_activate_zone()
2860 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_free_zone_cache() local
2866 mutex_lock(&fs_devices->device_list_mutex); in btrfs_free_zone_cache()
[all …]
H A Dscrub.c739 if (memcmp(header->fsid, fs_info->fs_devices->metadata_uuid, in scrub_verify_one_metadata()
746 header->fsid, fs_info->fs_devices->metadata_uuid); in scrub_verify_one_metadata()
2989 if (scrub_dev->fs_devices != fs_info->fs_devices) in scrub_supers()
3111 mutex_lock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3112 dev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_scrub_dev()
3115 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3122 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3134 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3145 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3153 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
[all …]
H A Dioctl.c440 list_for_each_entry_rcu(device, &fs_info->fs_devices->devices, in btrfs_ioctl_fitrim()
1015 device = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_ioctl_resize()
2476 if (fs_info->fs_devices->temp_fsid) { in btrfs_ioctl_add_dev()
2646 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_ioctl_fs_info() local
2658 fi_args->num_devices = fs_devices->num_devices; in btrfs_ioctl_fs_info()
2660 list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) { in btrfs_ioctl_fs_info()
2666 memcpy(&fi_args->fsid, fs_devices->fsid, sizeof(fi_args->fsid)); in btrfs_ioctl_fs_info()
2683 memcpy(&fi_args->metadata_uuid, fs_devices->metadata_uuid, in btrfs_ioctl_fs_info()
2712 dev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_ioctl_dev_info()
2722 memcpy(di_args->fsid, dev->fs_devices->fsid, BTRFS_UUID_SIZE); in btrfs_ioctl_dev_info()
H A Dextent-tree.c4263 if (btrfs_can_activate_zone(fs_info->fs_devices, ffe_ctl->flags)) in can_allocate_chunk_zoned()
5306 write_extent_buffer_fsid(buf, fs_info->fs_devices->metadata_uuid); in btrfs_init_new_buffer()
6715 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_trim_free_extents() local
6724 mutex_lock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6725 list_for_each_entry(dev, &fs_devices->devices, dev_list) { in btrfs_trim_free_extents()
6734 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6744 mutex_lock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6747 list_for_each_entry(dev, &fs_devices->devices, dev_list) { in btrfs_trim_free_extents()
6759 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6768 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
[all …]
H A Dspace-info.c233 if (fs_info->fs_devices->total_rw_bytes > 50ULL * SZ_1G) in calc_chunk_size()
448 mult_perc(fs_info->fs_devices->total_rw_bytes, 10)); in calc_effective_data_chunk_size()
H A Dfs.h737 struct btrfs_fs_devices *fs_devices; member
H A Dblock-group.c87 u64 num_devices = fs_info->fs_devices->rw_devices; in btrfs_reduce_alloc_profile()
2869 mutex_lock(&fs_info->fs_devices->device_list_mutex); in insert_dev_extents()
2879 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in insert_dev_extents()
4458 num_dev = fs_info->fs_devices->rw_devices; in get_profile_num_devs()
H A Dextent_io.c765 bio_set_dev(&bbio->bio, fs_info->fs_devices->latest_dev->bdev); in alloc_new_bio()
2254 bio_set_dev(&bbio->bio, fs_info->fs_devices->latest_dev->bdev); in write_one_eb()
/linux/fs/btrfs/tests/
H A Draid-stripe-tree-tests.c21 static struct btrfs_device *btrfs_device_by_devid(struct btrfs_fs_devices *fs_devices, in btrfs_device_by_devid() argument
26 list_for_each_entry(dev, &fs_devices->devices, dev_list) { in btrfs_device_by_devid()
61 io_stripe.dev = btrfs_device_by_devid(fs_info->fs_devices, 0); in test_punch_hole_3extents()
70 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_punch_hole_3extents()
91 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_punch_hole_3extents()
112 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_punch_hole_3extents()
237 io_stripe.dev = btrfs_device_by_devid(fs_info->fs_devices, 0); in test_delete_two_extents()
246 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_delete_two_extents()
267 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_delete_two_extents()
288 stripe->dev = btrfs_device_by_devid(fs_info->fs_devices, i); in test_delete_two_extents()
[all …]
/linux/include/trace/events/
H A Dbtrfs.h166 memcpy(__entry->fsid, fs_info->fs_devices->fsid, \