summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0002-raid5-delayed-stripe-fix.patch
diff options
context:
space:
mode:
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.patch43
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 @@
1From c3041d04e675a5d38a1d57fee3c59d4f073f512e Mon Sep 17 00:00:00 2001
2From: Shaohua Li <shli@kernel.org>
3Date: Tue, 3 Jul 2012 15:57:19 +1000
4Subject: [PATCH 002/109] raid5: delayed stripe fix
5
6commit fab363b5ff502d1b39ddcfec04271f5858d9f26e upstream.
7
8There isn't locking setting STRIPE_DELAYED and STRIPE_PREREAD_ACTIVE bits, but
9the two bits have relationship. A delayed stripe can be moved to hold list only
10when preread active stripe count is below IO_THRESHOLD. If a stripe has both
11the bits set, such stripe will be in delayed list and preread count not 0,
12which will make such stripe never leave delayed list.
13
14Signed-off-by: Shaohua Li <shli@fusionio.com>
15Signed-off-by: NeilBrown <neilb@suse.de>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/md/raid5.c | 4 +++-
19 1 files changed, 3 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
22index 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--
421.7.7.6
43