diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0017-md-raid10-fix-failure-when-trying-to-repair-a-read-e.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0017-md-raid10-fix-failure-when-trying-to-repair-a-read-e.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0017-md-raid10-fix-failure-when-trying-to-repair-a-read-e.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0017-md-raid10-fix-failure-when-trying-to-repair-a-read-e.patch new file mode 100644 index 00000000..1f96efac --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0017-md-raid10-fix-failure-when-trying-to-repair-a-read-e.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 4c1df6ee8b798576a23b25ab391cd7f3b5835bcd Mon Sep 17 00:00:00 2001 | ||
2 | From: NeilBrown <neilb@suse.de> | ||
3 | Date: Tue, 3 Jul 2012 15:55:33 +1000 | ||
4 | Subject: [PATCH 17/49] md/raid10: fix failure when trying to repair a read | ||
5 | error. | ||
6 | |||
7 | commit 055d3747dbf00ce85c6872ecca4d466638e80c22 upstream. | ||
8 | |||
9 | commit 58c54fcca3bac5bf9290cfed31c76e4c4bfbabaf | ||
10 | md/raid10: handle further errors during fix_read_error better. | ||
11 | |||
12 | in 3.1 added "r10_sync_page_io" which takes an IO size in sectors. | ||
13 | But we were passing the IO size in bytes!!! | ||
14 | This resulting in bio_add_page failing, and empty request being sent | ||
15 | down, and a consequent BUG_ON in scsi_lib. | ||
16 | |||
17 | [fix missing space in error message at same time] | ||
18 | |||
19 | This fix is suitable for 3.1.y and later. | ||
20 | |||
21 | Reported-by: Christian Balzer <chibi@gol.com> | ||
22 | Signed-off-by: NeilBrown <neilb@suse.de> | ||
23 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
24 | --- | ||
25 | drivers/md/raid10.c | 6 +++--- | ||
26 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c | ||
29 | index 3b67566..7a9eef6 100644 | ||
30 | --- a/drivers/md/raid10.c | ||
31 | +++ b/drivers/md/raid10.c | ||
32 | @@ -1919,7 +1919,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 | ||
33 | if (r10_sync_page_io(rdev, | ||
34 | r10_bio->devs[sl].addr + | ||
35 | sect, | ||
36 | - s<<9, conf->tmppage, WRITE) | ||
37 | + s, conf->tmppage, WRITE) | ||
38 | == 0) { | ||
39 | /* Well, this device is dead */ | ||
40 | printk(KERN_NOTICE | ||
41 | @@ -1956,7 +1956,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 | ||
42 | switch (r10_sync_page_io(rdev, | ||
43 | r10_bio->devs[sl].addr + | ||
44 | sect, | ||
45 | - s<<9, conf->tmppage, | ||
46 | + s, conf->tmppage, | ||
47 | READ)) { | ||
48 | case 0: | ||
49 | /* Well, this device is dead */ | ||
50 | @@ -2119,7 +2119,7 @@ read_more: | ||
51 | rdev = conf->mirrors[mirror].rdev; | ||
52 | printk_ratelimited( | ||
53 | KERN_ERR | ||
54 | - "md/raid10:%s: %s: redirecting" | ||
55 | + "md/raid10:%s: %s: redirecting " | ||
56 | "sector %llu to another mirror\n", | ||
57 | mdname(mddev), | ||
58 | bdevname(rdev->bdev, b), | ||
59 | -- | ||
60 | 1.7.10 | ||
61 | |||