From 07bbe9c29c96e445f19790619a261e6e61c523e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Thu, 24 Nov 2011 08:31:34 -0300 Subject: libre/linux-libre-3.1.2-1 --- ...aid10-fix-bug-when-activating-a-hot-spare.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch (limited to 'libre/linux-libre/md-raid10-fix-bug-when-activating-a-hot-spare.patch') 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 +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, + -- cgit v1.2.3-2-g168b