diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0002-raid5-delayed-stripe-fix.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0002-raid5-delayed-stripe-fix.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0002-raid5-delayed-stripe-fix.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0002-raid5-delayed-stripe-fix.patch new file mode 100644 index 00000000..bb9ebfa1 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0002-raid5-delayed-stripe-fix.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From c3041d04e675a5d38a1d57fee3c59d4f073f512e Mon Sep 17 00:00:00 2001 | ||
2 | From: Shaohua Li <shli@kernel.org> | ||
3 | Date: Tue, 3 Jul 2012 15:57:19 +1000 | ||
4 | Subject: [PATCH 002/109] raid5: delayed stripe fix | ||
5 | |||
6 | commit fab363b5ff502d1b39ddcfec04271f5858d9f26e upstream. | ||
7 | |||
8 | There isn't locking setting STRIPE_DELAYED and STRIPE_PREREAD_ACTIVE bits, but | ||
9 | the two bits have relationship. A delayed stripe can be moved to hold list only | ||
10 | when preread active stripe count is below IO_THRESHOLD. If a stripe has both | ||
11 | the bits set, such stripe will be in delayed list and preread count not 0, | ||
12 | which will make such stripe never leave delayed list. | ||
13 | |||
14 | Signed-off-by: Shaohua Li <shli@fusionio.com> | ||
15 | Signed-off-by: NeilBrown <neilb@suse.de> | ||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | --- | ||
18 | drivers/md/raid5.c | 4 +++- | ||
19 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c | ||
22 | index 6ba4954..26ef63a 100644 | ||
23 | --- a/drivers/md/raid5.c | ||
24 | +++ b/drivers/md/raid5.c | ||
25 | @@ -196,12 +196,14 @@ static void __release_stripe(struct r5conf *conf, struct stripe_head *sh) | ||
26 | BUG_ON(!list_empty(&sh->lru)); | ||
27 | BUG_ON(atomic_read(&conf->active_stripes)==0); | ||
28 | if (test_bit(STRIPE_HANDLE, &sh->state)) { | ||
29 | - if (test_bit(STRIPE_DELAYED, &sh->state)) | ||
30 | + if (test_bit(STRIPE_DELAYED, &sh->state) && | ||
31 | + !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) | ||
32 | list_add_tail(&sh->lru, &conf->delayed_list); | ||
33 | else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && | ||
34 | sh->bm_seq - conf->seq_write > 0) | ||
35 | list_add_tail(&sh->lru, &conf->bitmap_list); | ||
36 | else { | ||
37 | + clear_bit(STRIPE_DELAYED, &sh->state); | ||
38 | clear_bit(STRIPE_BIT_DELAY, &sh->state); | ||
39 | list_add_tail(&sh->lru, &conf->handle_list); | ||
40 | } | ||
41 | -- | ||
42 | 1.7.7.6 | ||
43 | |||