diff --git a/PKGBUILD b/PKGBUILD index 49a7618..c2c1195 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,7 +8,7 @@ pkgname=('linux' 'linux-headers' 'linux-docs') # Build stock -ARCH kernel _kernelname=${pkgname#linux} _basekernel=3.1 pkgver=${_basekernel} -pkgrel=3 +pkgrel=4 arch=('i686' 'x86_64') url="http://www.kernel.org/" license=('GPL2') @@ -25,7 +25,8 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-${pkgver}.tar.xz" 'i915-fix-incorrect-error-message.patch' 'iwlagn-fix-NULL-pointer-dereference.patch' 'dib0700-fix.patch' - 'usb-add-reset-resume-quirk-for-several-webcams.patch') + 'usb-add-reset-resume-quirk-for-several-webcams.patch' + 'md-raid10-fix-bug-when-activating-a-hot-spare.patch') md5sums=('edbdc798f23ae0f8045c82f6fa22c536' 'b88bbe3ed780441dbe1e385f4beae1e4' '08774980ad31da185e7f7379596b9001' @@ -35,7 +36,8 @@ md5sums=('edbdc798f23ae0f8045c82f6fa22c536' 'a50c9076012cb2dda49952dc6ec3e9c1' '61a6be40e8e1e9eae5f23f241e7a0779' '442334d777475e2a37db92d199672a28' - '52d41fa61e80277ace2b994412a0c856') + '52d41fa61e80277ace2b994412a0c856' + 'de12ec5c342f945a95b2f12c2b85e6bf') build() { cd "${srcdir}/linux-${_basekernel}" @@ -75,6 +77,11 @@ build() { # FS#26528 patch -Np1 -i "${srcdir}/usb-add-reset-resume-quirk-for-several-webcams.patch" + # Fix RAID10 hot spare activation (critical) + # https://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob_plain;f=queue-3.1/md-raid10-fix-bug-when-activating-a-hot-spare.patch;h=880849db5b7089b523f72c4d67a473e5330037fc;hb=HEAD + # FS#26767 + patch -Np1 -i "${srcdir}/md-raid10-fix-bug-when-activating-a-hot-spare.patch" + # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) # remove this when a Kconfig knob is made available by upstream # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) diff --git a/linux.install b/linux.install index edb998c..d6fda0c 100644 --- a/linux.install +++ b/linux.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME= -KERNEL_VERSION=3.1.0-3-ARCH +KERNEL_VERSION=3.1.0-4-ARCH post_install () { # updating module dependencies diff --git a/md-raid10-fix-bug-when-activating-a-hot-spare.patch b/md-raid10-fix-bug-when-activating-a-hot-spare.patch new file mode 100644 index 0000000..880849d --- /dev/null +++ b/md-raid10-fix-bug-when-activating-a-hot-spare.patch @@ -0,0 +1,40 @@ +From 7fcc7c8acf0fba44d19a713207af7e58267c1179 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Mon, 31 Oct 2011 12:59:44 +1100 +Subject: md/raid10: Fix bug when activating a hot-spare. + +From: NeilBrown + +commit 7fcc7c8acf0fba44d19a713207af7e58267c1179 upstream. + +This is a fairly serious bug in RAID10. + +When a RAID10 array is degraded and a hot-spare is activated, the +spare does not take up the empty slot, but rather replaces the first +working device. +This is likely to make the array non-functional. It would normally +be possible to recover the data, but that would need care and is not +guaranteed. + +This bug was introduced in commit + 2bb77736ae5dca0a189829fbb7379d43364a9dac +which first appeared in 3.1. + +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/raid10.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/md/raid10.c ++++ b/drivers/md/raid10.c +@@ -1337,7 +1337,7 @@ static int raid10_add_disk(mddev_t *mdde + mirror_info_t *p = &conf->mirrors[mirror]; + if (p->recovery_disabled == mddev->recovery_disabled) + continue; +- if (!p->rdev) ++ if (p->rdev) + continue; + + disk_stack_limits(mddev->gendisk, rdev->bdev,