diff options
-rw-r--r-- | kernels/linux-libre-pae/3.11-haswell-intel_pstate.patch | 32 | ||||
-rw-r--r-- | kernels/linux-libre-pae/3.12-btrfs-relocate-csums.patch | 63 | ||||
-rw-r--r-- | kernels/linux-libre-pae/PKGBUILD | 15 | ||||
-rw-r--r-- | kernels/linux-libre-xen/3.11-haswell-intel_pstate.patch | 32 | ||||
-rw-r--r-- | kernels/linux-libre-xen/3.12-btrfs-relocate-csums.patch | 63 | ||||
-rw-r--r-- | kernels/linux-libre-xen/PKGBUILD | 15 |
6 files changed, 148 insertions, 72 deletions
diff --git a/kernels/linux-libre-pae/3.11-haswell-intel_pstate.patch b/kernels/linux-libre-pae/3.11-haswell-intel_pstate.patch deleted file mode 100644 index 1f376b518..000000000 --- a/kernels/linux-libre-pae/3.11-haswell-intel_pstate.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6cdcdb793791f776ea9408581b1242b636d43b37 Mon Sep 17 00:00:00 2001 -From: Nell Hardcastle <nell@spicious.com> -Date: Sun, 30 Jun 2013 22:58:57 +0000 -Subject: intel_pstate: Add Haswell CPU models - -Enable the intel_pstate driver for Haswell CPUs. One missing Ivy Bridge -model (0x3E) is also included. Models referenced from -tools/power/x86/turbostat/turbostat.c:has_nehalem_turbo_ratio_limit - -Signed-off-by: Nell Hardcastle <nell@spicious.com> -Acked-by: Viresh Kumar <viresh.kumar@linaro.org> -Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com> -Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> ---- -diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c -index 6efd96c..9733f29 100644 ---- a/drivers/cpufreq/intel_pstate.c -+++ b/drivers/cpufreq/intel_pstate.c -@@ -522,6 +522,11 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = { - ICPU(0x2a, default_policy), - ICPU(0x2d, default_policy), - ICPU(0x3a, default_policy), -+ ICPU(0x3c, default_policy), -+ ICPU(0x3e, default_policy), -+ ICPU(0x3f, default_policy), -+ ICPU(0x45, default_policy), -+ ICPU(0x46, default_policy), - {} - }; - MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); --- -cgit v0.9.2 diff --git a/kernels/linux-libre-pae/3.12-btrfs-relocate-csums.patch b/kernels/linux-libre-pae/3.12-btrfs-relocate-csums.patch new file mode 100644 index 000000000..7209276ef --- /dev/null +++ b/kernels/linux-libre-pae/3.12-btrfs-relocate-csums.patch @@ -0,0 +1,63 @@ +From 4577b014d1bc3db386da3246f625888fc48083a9 Mon Sep 17 00:00:00 2001 +From: Josef Bacik <jbacik@fusionio.com> +Date: Fri, 27 Sep 2013 13:33:09 +0000 +Subject: Btrfs: relocate csums properly with prealloc extents + +A user reported a problem where they were getting csum errors when running a +balance and running systemd's journal. This is because systemd is awesome and +fallocate()'s its log space and writes into it. Unfortunately we assume that +when we read in all the csums for an extent that they are sequential starting at +the bytenr we care about. This obviously isn't the case for prealloc extents, +where we could have written to the middle of the prealloc extent only, which +means the csum would be for the bytenr in the middle of our range and not the +front of our range. Fix this by offsetting the new bytenr we are logging to +based on the original bytenr the csum was for. With this patch I no longer see +the csum errors I was seeing. Thanks, + +Cc: stable@vger.kernel.org +Reported-by: Chris Murphy <lists@colorremedies.com> +Signed-off-by: Josef Bacik <jbacik@fusionio.com> +Signed-off-by: Chris Mason <chris.mason@fusionio.com> +--- +diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c +index dec4f5a..0359eec 100644 +--- a/fs/btrfs/relocation.c ++++ b/fs/btrfs/relocation.c +@@ -4472,6 +4472,7 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len) + struct btrfs_root *root = BTRFS_I(inode)->root; + int ret; + u64 disk_bytenr; ++ u64 new_bytenr; + LIST_HEAD(list); + + ordered = btrfs_lookup_ordered_extent(inode, file_pos); +@@ -4483,13 +4484,24 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len) + if (ret) + goto out; + +- disk_bytenr = ordered->start; + while (!list_empty(&list)) { + sums = list_entry(list.next, struct btrfs_ordered_sum, list); + list_del_init(&sums->list); + +- sums->bytenr = disk_bytenr; +- disk_bytenr += sums->len; ++ /* ++ * We need to offset the new_bytenr based on where the csum is. ++ * We need to do this because we will read in entire prealloc ++ * extents but we may have written to say the middle of the ++ * prealloc extent, so we need to make sure the csum goes with ++ * the right disk offset. ++ * ++ * We can do this because the data reloc inode refers strictly ++ * to the on disk bytes, so we don't have to worry about ++ * disk_len vs real len like with real inodes since it's all ++ * disk length. ++ */ ++ new_bytenr = ordered->start + (sums->bytenr - disk_bytenr); ++ sums->bytenr = new_bytenr; + + btrfs_add_ordered_sum(inode, ordered, sums); + } +-- +cgit v0.9.2 diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD index 6528937b1..f38313eac 100644 --- a/kernels/linux-libre-pae/PKGBUILD +++ b/kernels/linux-libre-pae/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 200014 2013-11-21 08:49:51Z tpowa $ +# $Id: PKGBUILD 200328 2013-11-26 10:43:40Z tpowa $ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@parabola.nu> @@ -7,7 +7,7 @@ pkgbase=linux-libre-pae # Build stock -LIBRE-PAE kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.12 pkgver=${_basekernel}.1 -pkgrel=1 +pkgrel=3 arch=('i686') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -21,14 +21,16 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn "${pkgbase}.preset" 'boot-logo.patch' 'change-default-console-loglevel.patch' - 'criu-no-expert.patch') + 'criu-no-expert.patch' + '3.12-btrfs-relocate-csums.patch') md5sums=('254f59707b6676b59ce5ca5c3c698319' '0e52518b2bdf3aa7af0c63a4acfd7957' '73a3d12b7ada1677263d22ced7f933a4' 'f302c931bd85309da9d9792b4cc96467' '44260d2cb1a8b51c119d2ce1f83e457a' '98beb36f9b8cf16e58de2483ea9985e3' - 'd50c1ac47394e9aec637002ef3392bd1') + 'd50c1ac47394e9aec637002ef3392bd1' + '923c1728634d4e0f7b77177c36d94791') _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-PAE @@ -55,6 +57,11 @@ prepare() { # patch from fedora patch -Np1 -i "${srcdir}/criu-no-expert.patch" + # fix btrfs balance bug + # https://bugzilla.kernel.org/show_bug.cgi?id=63411 + # https://bugs.archlinux.org/task/37867 + patch -Np1 -i "${srcdir}/3.12-btrfs-relocate-csums.patch" + cat "${srcdir}/config" > ./.config # simpler if [ "${_kernelname}" != "" ]; then diff --git a/kernels/linux-libre-xen/3.11-haswell-intel_pstate.patch b/kernels/linux-libre-xen/3.11-haswell-intel_pstate.patch deleted file mode 100644 index 1f376b518..000000000 --- a/kernels/linux-libre-xen/3.11-haswell-intel_pstate.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6cdcdb793791f776ea9408581b1242b636d43b37 Mon Sep 17 00:00:00 2001 -From: Nell Hardcastle <nell@spicious.com> -Date: Sun, 30 Jun 2013 22:58:57 +0000 -Subject: intel_pstate: Add Haswell CPU models - -Enable the intel_pstate driver for Haswell CPUs. One missing Ivy Bridge -model (0x3E) is also included. Models referenced from -tools/power/x86/turbostat/turbostat.c:has_nehalem_turbo_ratio_limit - -Signed-off-by: Nell Hardcastle <nell@spicious.com> -Acked-by: Viresh Kumar <viresh.kumar@linaro.org> -Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com> -Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> ---- -diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c -index 6efd96c..9733f29 100644 ---- a/drivers/cpufreq/intel_pstate.c -+++ b/drivers/cpufreq/intel_pstate.c -@@ -522,6 +522,11 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = { - ICPU(0x2a, default_policy), - ICPU(0x2d, default_policy), - ICPU(0x3a, default_policy), -+ ICPU(0x3c, default_policy), -+ ICPU(0x3e, default_policy), -+ ICPU(0x3f, default_policy), -+ ICPU(0x45, default_policy), -+ ICPU(0x46, default_policy), - {} - }; - MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); --- -cgit v0.9.2 diff --git a/kernels/linux-libre-xen/3.12-btrfs-relocate-csums.patch b/kernels/linux-libre-xen/3.12-btrfs-relocate-csums.patch new file mode 100644 index 000000000..7209276ef --- /dev/null +++ b/kernels/linux-libre-xen/3.12-btrfs-relocate-csums.patch @@ -0,0 +1,63 @@ +From 4577b014d1bc3db386da3246f625888fc48083a9 Mon Sep 17 00:00:00 2001 +From: Josef Bacik <jbacik@fusionio.com> +Date: Fri, 27 Sep 2013 13:33:09 +0000 +Subject: Btrfs: relocate csums properly with prealloc extents + +A user reported a problem where they were getting csum errors when running a +balance and running systemd's journal. This is because systemd is awesome and +fallocate()'s its log space and writes into it. Unfortunately we assume that +when we read in all the csums for an extent that they are sequential starting at +the bytenr we care about. This obviously isn't the case for prealloc extents, +where we could have written to the middle of the prealloc extent only, which +means the csum would be for the bytenr in the middle of our range and not the +front of our range. Fix this by offsetting the new bytenr we are logging to +based on the original bytenr the csum was for. With this patch I no longer see +the csum errors I was seeing. Thanks, + +Cc: stable@vger.kernel.org +Reported-by: Chris Murphy <lists@colorremedies.com> +Signed-off-by: Josef Bacik <jbacik@fusionio.com> +Signed-off-by: Chris Mason <chris.mason@fusionio.com> +--- +diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c +index dec4f5a..0359eec 100644 +--- a/fs/btrfs/relocation.c ++++ b/fs/btrfs/relocation.c +@@ -4472,6 +4472,7 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len) + struct btrfs_root *root = BTRFS_I(inode)->root; + int ret; + u64 disk_bytenr; ++ u64 new_bytenr; + LIST_HEAD(list); + + ordered = btrfs_lookup_ordered_extent(inode, file_pos); +@@ -4483,13 +4484,24 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len) + if (ret) + goto out; + +- disk_bytenr = ordered->start; + while (!list_empty(&list)) { + sums = list_entry(list.next, struct btrfs_ordered_sum, list); + list_del_init(&sums->list); + +- sums->bytenr = disk_bytenr; +- disk_bytenr += sums->len; ++ /* ++ * We need to offset the new_bytenr based on where the csum is. ++ * We need to do this because we will read in entire prealloc ++ * extents but we may have written to say the middle of the ++ * prealloc extent, so we need to make sure the csum goes with ++ * the right disk offset. ++ * ++ * We can do this because the data reloc inode refers strictly ++ * to the on disk bytes, so we don't have to worry about ++ * disk_len vs real len like with real inodes since it's all ++ * disk length. ++ */ ++ new_bytenr = ordered->start + (sums->bytenr - disk_bytenr); ++ sums->bytenr = new_bytenr; + + btrfs_add_ordered_sum(inode, ordered, sums); + } +-- +cgit v0.9.2 diff --git a/kernels/linux-libre-xen/PKGBUILD b/kernels/linux-libre-xen/PKGBUILD index 5a3555c7a..6cb8ec0d9 100644 --- a/kernels/linux-libre-xen/PKGBUILD +++ b/kernels/linux-libre-xen/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 200014 2013-11-21 08:49:51Z tpowa $ +# $Id: PKGBUILD 200328 2013-11-26 10:43:40Z tpowa $ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@parabola.nu> @@ -7,7 +7,7 @@ pkgbase=linux-libre-xen # Build stock -LIBRE-XEN kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.12 pkgver=${_basekernel}.1 -pkgrel=1 +pkgrel=3 arch=('i686') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -21,14 +21,16 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn "${pkgbase}.preset" 'boot-logo.patch' 'change-default-console-loglevel.patch' - 'criu-no-expert.patch') + 'criu-no-expert.patch' + '3.12-btrfs-relocate-csums.patch') md5sums=('254f59707b6676b59ce5ca5c3c698319' '0e52518b2bdf3aa7af0c63a4acfd7957' 'fc7677b76dbe202a202100c027828d6b' 'b7c2805bb287a644c0a303bf7721e534' '44260d2cb1a8b51c119d2ce1f83e457a' '98beb36f9b8cf16e58de2483ea9985e3' - 'd50c1ac47394e9aec637002ef3392bd1') + 'd50c1ac47394e9aec637002ef3392bd1' + '923c1728634d4e0f7b77177c36d94791') _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-XEN @@ -55,6 +57,11 @@ prepare() { # patch from fedora patch -Np1 -i "${srcdir}/criu-no-expert.patch" + # fix btrfs balance bug + # https://bugzilla.kernel.org/show_bug.cgi?id=63411 + # https://bugs.archlinux.org/task/37867 + patch -Np1 -i "${srcdir}/3.12-btrfs-relocate-csums.patch" + cat "${srcdir}/config" > ./.config # simpler if [ "${_kernelname}" != "" ]; then |