Author: viric
Date: Mon Apr  9 21:02:17 2012
New Revision: 33714
URL: https://nixos.org/websvn/nix/?rev=33714&sc=1

Log:
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.

Added:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/btrfs-enospc.patch
Modified:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Added: nixpkgs/trunk/pkgs/os-specific/linux/kernel/btrfs-enospc.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/btrfs-enospc.patch      Mon Apr 
 9 21:02:17 2012        (r33714)
@@ -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);
+ }

Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix     Mon Apr  9 
21:01:00 2012        (r33713)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix     Mon Apr  9 
21:02:17 2012        (r33714)
@@ -359,4 +359,9 @@
       name = "guruplug-arch-number";
       patch = ./guruplug-mach-type.patch;
     };
+
+  btrfs_enospc =
+    { name = "btrfs-enospc-3.3-revert";
+      patch = ./btrfs-enospc.patch;
+    };
 }

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Mon Apr  9 21:01:00 
2012        (r33713)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Mon Apr  9 21:02:17 
2012        (r33714)
@@ -5713,6 +5713,7 @@
         kernelPatches.sec_perm_2_6_24
         kernelPatches.aufs3_3
         kernelPatches.efi_bootstub_config_3_3
+        kernelPatches.btrfs_enospc
         #kernelPatches.mips_restart_2_6_36
       ];
   };
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to