Lines Matching defs:cache
30 #include "free-space-cache.h"
271 * like send, can have a really old block in cache that may point at a
2188 btrfs_alloc_workqueue(fs_info, "cache", flags, max_active, 0);
2672 /* We can't trust the free space cache either */
3645 * Directly use bios here instead of relying on the page cache
4489 struct btrfs_block_group *cache;
4491 cache = btrfs_lookup_block_group(fs_info, head->bytenr);
4492 BUG_ON(!cache);
4494 spin_lock(&cache->space_info->lock);
4495 spin_lock(&cache->lock);
4496 cache->pinned += head->num_bytes;
4498 cache->space_info, head->num_bytes);
4499 cache->reserved -= head->num_bytes;
4500 cache->space_info->bytes_reserved -= head->num_bytes;
4501 spin_unlock(&cache->lock);
4502 spin_unlock(&cache->space_info->lock);
4504 &cache->space_info->total_bytes_pinned,
4507 btrfs_put_block_group(cache);
4650 static void btrfs_cleanup_bg_io(struct btrfs_block_group *cache)
4654 inode = cache->io_ctl.inode;
4663 cache->io_ctl.inode = NULL;
4666 ASSERT(cache->io_ctl.pages == NULL);
4667 btrfs_put_block_group(cache);
4673 struct btrfs_block_group *cache;
4677 cache = list_first_entry(&cur_trans->dirty_bgs,
4681 if (!list_empty(&cache->io_list)) {
4683 list_del_init(&cache->io_list);
4684 btrfs_cleanup_bg_io(cache);
4688 list_del_init(&cache->dirty_list);
4689 spin_lock(&cache->lock);
4690 cache->disk_cache_state = BTRFS_DC_ERROR;
4691 spin_unlock(&cache->lock);
4694 btrfs_put_block_group(cache);
4705 cache = list_first_entry(&cur_trans->io_bgs,
4709 list_del_init(&cache->io_list);
4710 spin_lock(&cache->lock);
4711 cache->disk_cache_state = BTRFS_DC_ERROR;
4712 spin_unlock(&cache->lock);
4713 btrfs_cleanup_bg_io(cache);