Lines Matching refs:rsv
177 void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv, enum btrfs_rsv_type type) in btrfs_init_block_rsv() argument
179 memset(rsv, 0, sizeof(*rsv)); in btrfs_init_block_rsv()
180 spin_lock_init(&rsv->lock); in btrfs_init_block_rsv()
181 rsv->type = type; in btrfs_init_block_rsv()
185 struct btrfs_block_rsv *rsv, in btrfs_init_metadata_block_rsv() argument
188 btrfs_init_block_rsv(rsv, type); in btrfs_init_metadata_block_rsv()
189 rsv->space_info = btrfs_find_space_info(fs_info, in btrfs_init_metadata_block_rsv()
207 struct btrfs_block_rsv *rsv) in btrfs_free_block_rsv() argument
209 if (!rsv) in btrfs_free_block_rsv()
211 btrfs_block_rsv_release(fs_info, rsv, (u64)-1, NULL); in btrfs_free_block_rsv()
212 kfree(rsv); in btrfs_free_block_rsv()
551 struct btrfs_block_rsv *rsv) in btrfs_check_trunc_cache_free_space() argument
560 spin_lock(&rsv->lock); in btrfs_check_trunc_cache_free_space()
561 if (rsv->reserved < needed_bytes) in btrfs_check_trunc_cache_free_space()
565 spin_unlock(&rsv->lock); in btrfs_check_trunc_cache_free_space()