Lines Matching defs:cache

1986 	/* Use the recovered stripes as cache to avoid read them from disk again. */
2364 struct btrfs_block_group *cache)
2366 struct btrfs_fs_info *fs_info = cache->fs_info;
2372 btrfs_wait_block_group_reservations(cache);
2373 btrfs_wait_nocow_writers(cache);
2374 btrfs_wait_ordered_roots(fs_info, U64_MAX, cache->start, cache->length);
2397 struct btrfs_block_group *cache;
2462 cache = btrfs_lookup_block_group(fs_info, chunk_offset);
2466 if (!cache)
2469 ASSERT(cache->start <= chunk_offset);
2489 if (cache->start < chunk_offset) {
2490 btrfs_put_block_group(cache);
2495 if (!test_bit(BLOCK_GROUP_FLAG_TO_COPY, &cache->runtime_flags)) {
2496 btrfs_put_block_group(cache);
2509 spin_lock(&cache->lock);
2510 if (test_bit(BLOCK_GROUP_FLAG_REMOVED, &cache->runtime_flags)) {
2511 spin_unlock(&cache->lock);
2512 btrfs_put_block_group(cache);
2515 btrfs_freeze_block_group(cache);
2516 spin_unlock(&cache->lock);
2558 ret = btrfs_inc_block_group_ro(cache, sctx->is_dev_replace);
2560 ret = finish_extent_writes_for_zoned(root, cache);
2562 btrfs_dec_block_group_ro(cache);
2564 btrfs_put_block_group(cache);
2572 !(cache->flags & BTRFS_BLOCK_GROUP_RAID56_MASK)) {
2581 * for scrub, as later we would use our own cache
2584 * prevent RMW from screwing up out cache.
2590 cache->start);
2597 btrfs_unfreeze_block_group(cache);
2598 btrfs_put_block_group(cache);
2609 btrfs_wait_nocow_writers(cache);
2610 btrfs_wait_ordered_roots(fs_info, U64_MAX, cache->start,
2611 cache->length);
2621 ret = scrub_chunk(sctx, cache, scrub_dev, found_key.offset,
2625 cache, found_key.offset))
2634 btrfs_dec_block_group_ro(cache);
2643 spin_lock(&cache->lock);
2644 if (!test_bit(BLOCK_GROUP_FLAG_REMOVED, &cache->runtime_flags) &&
2645 !cache->ro && cache->reserved == 0 && cache->used == 0) {
2646 spin_unlock(&cache->lock);
2649 cache);
2651 btrfs_mark_bg_unused(cache);
2653 spin_unlock(&cache->lock);
2656 btrfs_unfreeze_block_group(cache);
2657 btrfs_put_block_group(cache);