Re: [PATCH] Btrfs: fix free space cache when there are pinned extents and clusters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	spin_lock(&block_group->tree_lock);
> +	if (btrfs_block_group_free_space(block_group) !=

This function call can be replaced by block_group->free_space, so
we don't have to iterate the tree.

(This function gets removed in my patchset for inode number caching)

> +	    (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 free_cache;
> +	}
> +	spin_unlock(&block_group->tree_lock);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux