summaryrefslogtreecommitdiffstats
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-04-09 21:02:17 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-04-09 21:02:17 +0000
commitb35d2c6b895607a939cfef446ca37b0d869fede6 (patch)
treec9911f31fc57379fe389e21087f7fbb1cb7bd972 /pkgs/os-specific
parent5dfcf188015721255f9056308d4f641441cb2cb7 (diff)
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
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/btrfs-enospc.patch21
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix5
2 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/btrfs-enospc.patch b/pkgs/os-specific/linux/kernel/btrfs-enospc.patch
new file mode 100644
index 000000000000..aebe285227de
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/btrfs-enospc.patch
@@ -0,0 +1,21 @@
+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);
+ }
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 75f6473b57ba..9d4a6d001c4a 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -359,4 +359,9 @@ rec {
name = "guruplug-arch-number";
patch = ./guruplug-mach-type.patch;
};
+
+ btrfs_enospc =
+ { name = "btrfs-enospc-3.3-revert";
+ patch = ./btrfs-enospc.patch;
+ };
}