search for: btrfs_block_group_free_space

Displaying 1 result from an estimated 1 matches for "btrfs_block_group_free_space".

2011 Mar 31
4
[PATCH] Btrfs: fix free space cache when there are pinned extents and clusters
...o, u64 num_entries; u64 num_bitmaps; u64 generation; + u64 used = btrfs_block_group_used(&block_group->item); u32 cur_crc = ~(u32)0; pgoff_t index = 0; unsigned long first_page_offset; @@ -467,6 +469,17 @@ next: index++; } + spin_lock(&block_group->tree_lock); + if (btrfs_block_group_free_space(block_group) != + (block_group->key.offset - used - block_group->bytes_super)) { + spin_unlock(&block_group->tree_lock); + printk(KERN_ERR "block group %llu has an wrong amount of free " + "space\n", block_group->key.objectid); + ret = 0; + goto f...