Home
last modified time | relevance | path

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

/linux/fs/btrfs/
H A Dvolumes.c419 static void free_fs_devices(struct btrfs_fs_devices *fs_devices) in free_fs_devices() argument
423 WARN_ON(fs_devices->opened); in free_fs_devices()
424 WARN_ON(fs_devices->holding); in free_fs_devices()
425 while (!list_empty(&fs_devices->devices)) { in free_fs_devices()
426 device = list_first_entry(&fs_devices->devices, in free_fs_devices()
431 kfree(fs_devices); in free_fs_devices()
436 struct btrfs_fs_devices *fs_devices; in btrfs_cleanup_fs_uuids() local
439 fs_devices = list_first_entry(&fs_uuids, struct btrfs_fs_devices, in btrfs_cleanup_fs_uuids()
441 list_del(&fs_devices->fs_list); in btrfs_cleanup_fs_uuids()
442 free_fs_devices(fs_devices); in btrfs_cleanup_fs_uuids()
[all …]
H A Dvolumes.h126 struct btrfs_fs_devices *fs_devices; member
748 int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
752 void btrfs_close_devices(struct btrfs_fs_devices *fs_devices);
754 void btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices);
774 struct btrfs_device *btrfs_find_device(const struct btrfs_fs_devices *fs_devices,
891 static inline void btrfs_fs_devices_inc_holding(struct btrfs_fs_devices *fs_devices) in btrfs_fs_devices_inc_holding() argument
894 ASSERT(fs_devices->holding >= 0); in btrfs_fs_devices_inc_holding()
895 fs_devices->holding++; in btrfs_fs_devices_inc_holding()
898 static inline void btrfs_fs_devices_dec_holding(struct btrfs_fs_devices *fs_devices) in btrfs_fs_devices_dec_holding() argument
901 ASSERT(fs_devices->holding > 0); in btrfs_fs_devices_dec_holding()
[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 Dsuper.c75 btrfs_info(fs_info, "last unmount of filesystem %pU", fs_info->fs_devices->fsid); in btrfs_put_super()
773 !fs_info->fs_devices->rotating) in set_device_specific_options()
788 fs_info->fs_devices->discardable && in set_device_specific_options()
950 struct btrfs_fs_devices *fs_devices) in btrfs_fill_super() argument
974 ret = open_ctree(sb, fs_devices); in btrfs_fill_super()
1301 if (fs_info->fs_devices->rw_devices == 0) in btrfs_remount_rw()
1607 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_calc_avail_data_space() local
1620 nr_devices = fs_info->fs_devices->open_devices; in btrfs_calc_avail_data_space()
1623 nr_devices = fs_info->fs_devices->open_devices; in btrfs_calc_avail_data_space()
1650 list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) { in btrfs_calc_avail_data_space()
[all …]
H A Ddisk-io.c289 ASSERT(memcmp_extent_buffer(eb, fs_info->fs_devices->metadata_uuid, in btree_csum_one_bio()
335 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices, *seed_devs; in check_tree_block_fsid() local
347 if (memcmp(fsid, fs_info->fs_devices->metadata_uuid, BTRFS_FSID_SIZE) == 0) in check_tree_block_fsid()
350 list_for_each_entry(seed_devs, &fs_devices->seed_list, seed_list) in check_tree_block_fsid()
1228 if (fs_info->fs_devices) in btrfs_free_fs_info()
1229 btrfs_close_devices(fs_info->fs_devices); in btrfs_free_fs_info()
2029 struct btrfs_fs_devices *fs_devices) in btrfs_replay_log() argument
2038 if (unlikely(fs_devices->rw_devices == 0)) { in btrfs_replay_log()
2480 if (unlikely(!fs_info->fs_devices->temp_fsid && in btrfs_validate_super()
2481 memcmp(fs_info->fs_devices->fsid, sb->fsid, BTRFS_FSID_SIZE) != 0)) { in btrfs_validate_super()
[all …]
H A Dzoned.c334 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_get_dev_zone_info_all_devices() local
346 list_for_each_entry(device, &fs_devices->devices, dev_list) { in btrfs_get_dev_zone_info_all_devices()
696 list_for_each_entry(device, &fs_info->fs_devices->devices, dev_list) { in btrfs_check_for_zoned_device()
724 list_for_each_entry(device, &fs_info->fs_devices->devices, dev_list) { in btrfs_check_zoned_mode()
784 fs_info->fs_devices->chunk_alloc_policy = BTRFS_CHUNK_ALLOC_ZONED; in btrfs_check_zoned_mode()
2662 bool btrfs_can_activate_zone(struct btrfs_fs_devices *fs_devices, u64 flags) in btrfs_can_activate_zone() argument
2664 struct btrfs_fs_info *fs_info = fs_devices->fs_info; in btrfs_can_activate_zone()
2677 list_for_each_entry(device, &fs_devices->alloc_list, dev_alloc_list) { in btrfs_can_activate_zone()
2881 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_free_zone_cache() local
2887 mutex_lock(&fs_devices->device_list_mutex); in btrfs_free_zone_cache()
[all …]
H A Dscrub.c703 if (memcmp(header->fsid, fs_info->fs_devices->metadata_uuid, in scrub_verify_one_metadata()
710 header->fsid, fs_info->fs_devices->metadata_uuid); in scrub_verify_one_metadata()
2960 if (scrub_dev->fs_devices != fs_info->fs_devices) in scrub_supers()
3074 mutex_lock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3075 dev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_scrub_dev()
3078 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3085 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3097 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3108 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
3116 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in btrfs_scrub_dev()
[all …]
H A Ddisk-io.h58 int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_devices);
H A Dfs.c226 sysfs_notify(&fs_info->fs_devices->fsid_kobj, NULL, "exclusive_operation"); in btrfs_exclop_finish()
H A Dextent-tree.c4267 if (btrfs_can_activate_zone(fs_info->fs_devices, ffe_ctl->flags)) in can_allocate_chunk_zoned()
5313 write_extent_buffer_fsid(buf, fs_info->fs_devices->metadata_uuid); in btrfs_init_new_buffer()
6732 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_trim_free_extents() local
6741 mutex_lock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6742 list_for_each_entry(dev, &fs_devices->devices, dev_list) { in btrfs_trim_free_extents()
6751 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6761 mutex_lock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6764 list_for_each_entry(dev, &fs_devices->devices, dev_list) { in btrfs_trim_free_extents()
6776 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
6785 mutex_unlock(&fs_devices->device_list_mutex); in btrfs_trim_free_extents()
[all …]
H A Dioctl.c478 list_for_each_entry_rcu(device, &fs_info->fs_devices->devices, in btrfs_ioctl_fitrim()
1052 device = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_ioctl_resize()
2526 if (fs_info->fs_devices->temp_fsid) { in btrfs_ioctl_add_dev()
2691 struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; in btrfs_ioctl_fs_info() local
2702 fi_args->num_devices = fs_devices->num_devices; in btrfs_ioctl_fs_info()
2704 list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) { in btrfs_ioctl_fs_info()
2710 memcpy(&fi_args->fsid, fs_devices->fsid, sizeof(fi_args->fsid)); in btrfs_ioctl_fs_info()
2727 memcpy(&fi_args->metadata_uuid, fs_devices->metadata_uuid, in btrfs_ioctl_fs_info()
2755 dev = btrfs_find_device(fs_info->fs_devices, &args); in btrfs_ioctl_dev_info()
2765 memcpy(di_args->fsid, dev->fs_devices->fsid, BTRFS_UUID_SIZE); in btrfs_ioctl_dev_info()
H A Dfs.h748 struct btrfs_fs_devices *fs_devices; member
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 Ddirect-io.c580 iomap->bdev = fs_info->fs_devices->latest_dev->bdev; in btrfs_dio_iomap_begin()
H A Dblock-group.c115 u64 num_devices = fs_info->fs_devices->rw_devices; in btrfs_reduce_alloc_profile()
2902 mutex_lock(&fs_info->fs_devices->device_list_mutex); in insert_dev_extents()
2912 mutex_unlock(&fs_info->fs_devices->device_list_mutex); in insert_dev_extents()
4491 num_dev = fs_info->fs_devices->rw_devices; in get_profile_num_devs()
H A Dctree.c286 write_extent_buffer_fsid(cow, fs_info->fs_devices->metadata_uuid); in btrfs_copy_root()
520 write_extent_buffer_fsid(cow, fs_info->fs_devices->metadata_uuid); in btrfs_force_cow_block()
H A Dextent_io.c793 bio_set_dev(&bbio->bio, fs_info->fs_devices->latest_dev->bdev); in alloc_new_bio()
2459 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.h194 memcpy(__entry->fsid, fs_info->fs_devices->fsid, \