summaryrefslogtreecommitdiff
path: root/libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-11-25 12:00:05 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-11-25 12:00:05 -0300
commitd59c722c306fa39fcecf011b411b77faffca5cbd (patch)
treed6a3582523245b624d1a905d4b46d8344429e617 /libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch
parent939541abc901bd03328b55aaed0fb1862f803c05 (diff)
parent5894dd675f4bd3ba296d262fae99b3b87a0f87fd (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/gri/PKGBUILD community/multiget/PKGBUILD core/bash/PKGBUILD core/grep/PKGBUILD extra/ffmpeg/PKGBUILD extra/vlc/PKGBUILD extra/xfce4-screenshooter/PKGBUILD extra/xfce4-settings/PKGBUILD libre/linux-libre/PKGBUILD libre/linux-libre/dib0700-fix.patch libre/linux-libre/i915-fix-ghost-tv-output.patch libre/linux-libre/i915-fix-incorrect-error-message.patch libre/linux-libre/iwlagn-fix-NULL-pointer-dereference.patch libre/linux-libre/linux-libre.install libre/linux-libre/usb-add-reset-resume-quirk-for-several-webcams.patch
Diffstat (limited to 'libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch')
-rw-r--r--libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch b/libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch
new file mode 100644
index 000000000..79be53afb
--- /dev/null
+++ b/libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch
@@ -0,0 +1,41 @@
+From 7fcc7c8acf0fba44d19a713207af7e58267c1179 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Mon, 31 Oct 2011 12:59:44 +1100
+Subject: md/raid10: Fix bug when activating a hot-spare.
+
+From: NeilBrown <neilb@suse.de>
+
+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 <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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,
+