3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/kernel/btrfs-enospc.patch
Lluís Batlle i Rossell b35d2c6b89 Adding a patch for linux 3.3 for btrfs regarding ENOSPC.
This should solve the problem I had, where I could not boot either 3.3 or 3.3.1
in my system, as I got ENOSPC all the time.


svn path=/nixpkgs/trunk/; revision=33714
2012-04-09 21:02:17 +00:00

22 lines
854 B
Diff

Revert of http://git.kernel.org/?p=linux/kernel/git/mason/linux-btrfs.git;a=commit;h=5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf
Btrfs mailing list where this patch comes from:
http://article.gmane.org/gmane.comp.file-systems.btrfs/16650
This change caused early ENOSPC, and should be integrated to some linux 3.3, but it is still
not there. That's what #btrfs people say.
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index dc083f5..079e5a1 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4108,7 +4108,7 @@ static u64 calc_global_metadata_size(struct btrfs_fs_info *fs_info)
num_bytes += div64_u64(data_used + meta_used, 50);
if (num_bytes * 3 > meta_used)
- num_bytes = div64_u64(meta_used, 3) * 2;
+ num_bytes = div64_u64(meta_used, 3);
return ALIGN(num_bytes, fs_info->extent_root->leafsize << 10);
}