Searched refs:global_rsv (Results 1 – 5 of 5) sorted by relevance
279 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; in btrfs_block_rsv_release() local288 target = global_rsv; in btrfs_block_rsv_release()289 else if (block_rsv != global_rsv && !btrfs_block_rsv_full(delayed_rsv)) in btrfs_block_rsv_release()330 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; in btrfs_cond_migrate_bytes() local333 if (global_rsv->space_info != dest->space_info) in btrfs_cond_migrate_bytes()336 spin_lock(&global_rsv->lock); in btrfs_cond_migrate_bytes()337 min_bytes = div_factor(global_rsv->size, min_factor); in btrfs_cond_migrate_bytes()338 if (global_rsv->reserved < min_bytes + num_bytes) { in btrfs_cond_migrate_bytes()339 spin_unlock(&global_rsv->lock); in btrfs_cond_migrate_bytes()342 global_rsv->reserved -= num_bytes; in btrfs_cond_migrate_bytes()[all …]
968 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; in steal_from_global_rsv() local974 if (global_rsv->space_info != space_info) in steal_from_global_rsv()977 spin_lock(&global_rsv->lock); in steal_from_global_rsv()978 min_bytes = div_factor(global_rsv->size, 1); in steal_from_global_rsv()979 if (global_rsv->reserved < min_bytes + ticket->bytes) { in steal_from_global_rsv()980 spin_unlock(&global_rsv->lock); in steal_from_global_rsv()983 global_rsv->reserved -= ticket->bytes; in steal_from_global_rsv()988 if (global_rsv->reserved < global_rsv->size) in steal_from_global_rsv()989 global_rsv->full = 0; in steal_from_global_rsv()990 spin_unlock(&global_rsv->lock); in steal_from_global_rsv()[all …]
32 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; in btrfs_check_space_for_delayed_refs() local36 spin_lock(&global_rsv->lock); in btrfs_check_space_for_delayed_refs()37 reserved = global_rsv->reserved; in btrfs_check_space_for_delayed_refs()38 spin_unlock(&global_rsv->lock); in btrfs_check_space_for_delayed_refs()
505 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; in btrfs_subvolume_reserve_metadata() local524 ret = btrfs_block_rsv_migrate(global_rsv, rsv, num_bytes, true); in btrfs_subvolume_reserve_metadata()
2672 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; in unpin_extent_range() local2733 global_rsv->space_info == space_info) { in unpin_extent_range()2734 spin_lock(&global_rsv->lock); in unpin_extent_range()2735 if (!global_rsv->full) { in unpin_extent_range()2736 u64 to_add = min(len, global_rsv->size - in unpin_extent_range()2737 global_rsv->reserved); in unpin_extent_range()2739 global_rsv->reserved += to_add; in unpin_extent_range()2742 if (global_rsv->reserved >= global_rsv->size) in unpin_extent_range()2743 global_rsv->full = 1; in unpin_extent_range()2746 spin_unlock(&global_rsv->lock); in unpin_extent_range()