Home
last modified time | relevance | path

Searched refs:space_info (Results 1 – 21 of 21) sorted by relevance

/linux-6.1.9/fs/btrfs/
Dspace-info.c178 struct list_head *head = &info->space_info; in btrfs_clear_space_info_full()
216 void btrfs_update_space_info_chunk_size(struct btrfs_space_info *space_info, in btrfs_update_space_info_chunk_size() argument
219 WRITE_ONCE(space_info->chunk_size, chunk_size); in btrfs_update_space_info_chunk_size()
225 struct btrfs_space_info *space_info; in create_space_info() local
229 space_info = kzalloc(sizeof(*space_info), GFP_NOFS); in create_space_info()
230 if (!space_info) in create_space_info()
234 INIT_LIST_HEAD(&space_info->block_groups[i]); in create_space_info()
235 init_rwsem(&space_info->groups_sem); in create_space_info()
236 spin_lock_init(&space_info->lock); in create_space_info()
237 space_info->flags = flags & BTRFS_BLOCK_GROUP_TYPE_MASK; in create_space_info()
[all …]
Dblock-rsv.c108 struct btrfs_space_info *space_info = block_rsv->space_info; in block_rsv_release_bytes() local
152 space_info, in block_rsv_release_bytes()
186 rsv->space_info = btrfs_find_space_info(fs_info, in btrfs_init_metadata_block_rsv()
292 if (target && block_rsv->space_info != target->space_info) in btrfs_block_rsv_release()
333 if (global_rsv->space_info != dest->space_info) in btrfs_cond_migrate_bytes()
354 struct btrfs_space_info *sinfo = block_rsv->space_info; in btrfs_update_global_block_rsv()
446 struct btrfs_space_info *space_info; in btrfs_init_global_block_rsv() local
448 space_info = btrfs_find_space_info(fs_info, BTRFS_BLOCK_GROUP_SYSTEM); in btrfs_init_global_block_rsv()
449 fs_info->chunk_block_rsv.space_info = space_info; in btrfs_init_global_block_rsv()
451 space_info = btrfs_find_space_info(fs_info, BTRFS_BLOCK_GROUP_METADATA); in btrfs_init_global_block_rsv()
[all …]
Dspace-info.h92 static inline bool btrfs_mixed_space_info(struct btrfs_space_info *space_info) in btrfs_mixed_space_info() argument
94 return ((space_info->flags & BTRFS_BLOCK_GROUP_METADATA) && in btrfs_mixed_space_info()
95 (space_info->flags & BTRFS_BLOCK_GROUP_DATA)); in btrfs_mixed_space_info()
128 void btrfs_update_space_info_chunk_size(struct btrfs_space_info *space_info,
143 struct btrfs_space_info *space_info);
145 struct btrfs_space_info *space_info, u64 bytes,
150 struct btrfs_space_info *space_info, in btrfs_space_info_free_bytes_may_use() argument
153 spin_lock(&space_info->lock); in btrfs_space_info_free_bytes_may_use()
154 btrfs_space_info_update_bytes_may_use(fs_info, space_info, -num_bytes); in btrfs_space_info_free_bytes_may_use()
155 btrfs_try_granting_tickets(fs_info, space_info); in btrfs_space_info_free_bytes_may_use()
[all …]
Dblock-group.c369 struct btrfs_space_info *space_info = bg->space_info; in btrfs_wait_block_group_reservations() local
386 down_write(&space_info->groups_sem); in btrfs_wait_block_group_reservations()
387 up_write(&space_info->groups_sem); in btrfs_wait_block_group_reservations()
712 spin_lock(&block_group->space_info->lock); in caching_thread()
715 block_group->space_info->bytes_used += bytes_used >> 1; in caching_thread()
717 spin_unlock(&block_group->space_info->lock); in caching_thread()
816 struct list_head *head = &fs_info->space_info; in clear_incompat_bg_bits()
963 down_write(&block_group->space_info->groups_sem); in btrfs_remove_block_group()
969 if (list_empty(&block_group->space_info->block_groups[index])) { in btrfs_remove_block_group()
970 kobj = block_group->space_info->block_group_kobjs[index]; in btrfs_remove_block_group()
[all …]
Dsysfs.c717 BTRFS_ATTR(space_info, field, btrfs_space_info_show_##field)
738 struct btrfs_space_info *space_info = to_space_info(kobj); in btrfs_chunk_size_store() local
753 if (space_info->flags & BTRFS_BLOCK_GROUP_SYSTEM) in btrfs_chunk_size_store()
774 btrfs_update_space_info_chunk_size(space_info, val); in btrfs_chunk_size_store()
787 struct btrfs_space_info *space_info = to_space_info(kobj); in btrfs_force_chunk_alloc_store() local
813 ret = btrfs_force_chunk_alloc(trans, space_info->flags); in btrfs_force_chunk_alloc_store()
821 BTRFS_ATTR_W(space_info, force_chunk_alloc, btrfs_force_chunk_alloc_store);
835 BTRFS_ATTR_RW(space_info, chunk_size, btrfs_chunk_size_show, btrfs_chunk_size_store);
841 struct btrfs_space_info *space_info = to_space_info(kobj); in btrfs_sinfo_bg_reclaim_threshold_show() local
843 return sysfs_emit(buf, "%d\n", READ_ONCE(space_info->bg_reclaim_threshold)); in btrfs_sinfo_bg_reclaim_threshold_show()
[all …]
Dsysfs.h32 struct btrfs_space_info *space_info);
33 void btrfs_sysfs_remove_space_info(struct btrfs_space_info *space_info);
Dextent-tree.c2518 spin_lock(&cache->space_info->lock); in pin_down_extent()
2521 btrfs_space_info_update_bytes_pinned(fs_info, cache->space_info, in pin_down_extent()
2525 cache->space_info->bytes_reserved -= num_bytes; in pin_down_extent()
2528 spin_unlock(&cache->space_info->lock); in pin_down_extent()
2643 struct btrfs_space_info *space_info, u64 *empty_cluster) in fetch_cluster_info() argument
2648 if (btrfs_mixed_space_info(space_info)) in fetch_cluster_info()
2651 if (space_info->flags & BTRFS_BLOCK_GROUP_METADATA) { in fetch_cluster_info()
2657 } else if ((space_info->flags & BTRFS_BLOCK_GROUP_DATA) && in fetch_cluster_info()
2671 struct btrfs_space_info *space_info; in unpin_extent_range() local
2690 cache->space_info, in unpin_extent_range()
[all …]
Dzoned.c1877 struct btrfs_space_info *space_info = block_group->space_info; in btrfs_zone_activate() local
1889 spin_lock(&space_info->lock); in btrfs_zone_activate()
1918 space_info->active_total_bytes += block_group->length; in btrfs_zone_activate()
1920 btrfs_try_granting_tickets(fs_info, space_info); in btrfs_zone_activate()
1921 spin_unlock(&space_info->lock); in btrfs_zone_activate()
1934 spin_unlock(&space_info->lock); in btrfs_zone_activate()
2299 struct btrfs_space_info *space_info, in btrfs_zoned_activate_one_bg() argument
2305 if (!btrfs_is_zoned(fs_info) || (space_info->flags & BTRFS_BLOCK_GROUP_DATA)) in btrfs_zoned_activate_one_bg()
2309 if (space_info->active_total_bytes == space_info->total_bytes) in btrfs_zoned_activate_one_bg()
2316 down_read(&space_info->groups_sem); in btrfs_zoned_activate_one_bg()
[all …]
Dblock-rsv.h26 struct btrfs_space_info *space_info; member
Dzoned.h86 struct btrfs_space_info *space_info, bool do_finish);
273 struct btrfs_space_info *space_info, in btrfs_zoned_activate_one_bg() argument
Dblock-group.h133 struct btrfs_space_info *space_info; member
Dfree-space-cache.c2673 struct btrfs_space_info *sinfo = block_group->space_info; in __btrfs_add_free_space_zoned()
3631 struct btrfs_space_info *space_info = block_group->space_info; in do_trimming() local
3641 spin_lock(&space_info->lock); in do_trimming()
3645 space_info->bytes_reserved += reserved_bytes; in do_trimming()
3649 spin_unlock(&space_info->lock); in do_trimming()
3670 spin_lock(&space_info->lock); in do_trimming()
3673 space_info->bytes_readonly += reserved_bytes; in do_trimming()
3675 space_info->bytes_reserved -= reserved_bytes; in do_trimming()
3677 spin_unlock(&space_info->lock); in do_trimming()
Droot-tree.c518 rsv->space_info = btrfs_find_space_info(fs_info, in btrfs_subvolume_reserve_metadata()
Ddisk-io.c3015 INIT_LIST_HEAD(&fs_info->space_info); in btrfs_init_fs_info()
4963 spin_lock(&cache->space_info->lock); in btrfs_destroy_delayed_refs()
4967 cache->space_info, head->num_bytes); in btrfs_destroy_delayed_refs()
4969 cache->space_info->bytes_reserved -= head->num_bytes; in btrfs_destroy_delayed_refs()
4971 spin_unlock(&cache->space_info->lock); in btrfs_destroy_delayed_refs()
Dtransaction.c619 if (rsv->space_info->force_alloc) in start_transaction()
707 u64 flags = h->block_rsv->space_info->flags; in start_transaction()
Ddelayed-ref.c186 delayed_refs_rsv->space_info, to_free); in btrfs_migrate_to_delayed_refs_rsv()
Dsuper.c2345 list_for_each_entry(found, &fs_info->space_info, list) { in btrfs_statfs()
2416 if (!mixed && block_rsv->space_info->full && in btrfs_statfs()
Dvolumes.c5101 struct btrfs_space_info *space_info; in init_alloc_chunk_ctl_policy_regular() local
5103 space_info = btrfs_find_space_info(fs_devices->fs_info, ctl->type); in init_alloc_chunk_ctl_policy_regular()
5104 ASSERT(space_info); in init_alloc_chunk_ctl_policy_regular()
5106 ctl->max_chunk_size = READ_ONCE(space_info->chunk_size); in init_alloc_chunk_ctl_policy_regular()
Dtree-log.c2595 spin_lock(&cache->space_info->lock); in unaccount_log_buffer()
2598 cache->space_info->bytes_reserved -= fs_info->nodesize; in unaccount_log_buffer()
2600 spin_unlock(&cache->space_info->lock); in unaccount_log_buffer()
Dioctl.c3890 list_for_each_entry(tmp, &fs_info->space_info, list) { in btrfs_ioctl_space_info()
3943 list_for_each_entry(tmp, &fs_info->space_info, list) { in btrfs_ioctl_space_info()
Dctree.h867 struct list_head space_info; member