path: root/free-space-cache.c
diff options
authorJosef Bacik <>2013-05-03 21:00:52 +0000
committerChris Mason <>2013-05-06 13:41:58 -0400
commitc6eb10a7a43390e975b3f63fdf32cea58af948ea (patch)
tree426bf42d3f9523e8005786450ec4db4092d212aa /free-space-cache.c
parent9c821327408803229e93a788e032e8e9caf11686 (diff)
Btrfs-progs: init free space ctl with proper unit
btrfsck was blowing up when checking the free space cache when we ran xfstests with -l 64k. That is because I was init'ing the free space ctl to whatever the leafsize was, which isn't right for data block groups. With this patch btrfsck no longer complains. This also fixes a tiny little typo in free-space-cache.c I noticed while figuring this problem out. Thanks, Signed-off-by: Josef Bacik <> Signed-off-by: Chris Mason <>
Diffstat (limited to 'free-space-cache.c')
1 files changed, 0 insertions, 2 deletions
diff --git a/free-space-cache.c b/free-space-cache.c
index 8a77a32a..5fb8ece5 100644
--- a/free-space-cache.c
+++ b/free-space-cache.c
@@ -808,8 +808,6 @@ int btrfs_add_free_space(struct btrfs_free_space_ctl *ctl, u64 offset,
try_merge_free_space(ctl, info);
ret = link_free_space(ctl, info);
- if (ret)
if (ret) {
printk(KERN_CRIT "btrfs: unable to add free space :%d\n", ret);
BUG_ON(ret == -EEXIST);