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
This commit is contained in:
Lluís Batlle i Rossell 2012-04-09 21:02:17 +00:00
parent 5dfcf18801
commit b35d2c6b89
3 changed files with 27 additions and 0 deletions

View file

@ -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);
}

View file

@ -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;
};
}

View file

@ -5713,6 +5713,7 @@ let
kernelPatches.sec_perm_2_6_24
kernelPatches.aufs3_3
kernelPatches.efi_bootstub_config_3_3
kernelPatches.btrfs_enospc
#kernelPatches.mips_restart_2_6_36
];
};