aboutsummaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2013-05-23 14:10:40 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2013-05-23 14:10:40 +0300
commitf80ee635bbaceb859abf9a38de01149cbe25cf5e (patch)
treeee8a629b00e6afcaa50d66aac59fecb735f68e9e /drivers/md
parentf7ae240ea162f1bf80c2f9d58e42fac888f4320b (diff)
Apply 3.8.13-rt9 patchesHEADmaster
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c4
-rw-r--r--drivers/md/raid5.c7
-rw-r--r--drivers/md/raid5.h1
3 files changed, 8 insertions, 4 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 0d8f086b..0e1699e2 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1677,14 +1677,14 @@ static void dm_request_fn(struct request_queue *q)
if (map_request(ti, clone, md))
goto requeued;
- BUG_ON(!irqs_disabled());
+ BUG_ON_NONRT(!irqs_disabled());
spin_lock(q->queue_lock);
}
goto out;
requeued:
- BUG_ON(!irqs_disabled());
+ BUG_ON_NONRT(!irqs_disabled());
spin_lock(q->queue_lock);
delay_and_out:
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 94ce78ec..0089cb16 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1418,8 +1418,9 @@ static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request)
struct raid5_percpu *percpu;
unsigned long cpu;
- cpu = get_cpu();
+ cpu = get_cpu_light();
percpu = per_cpu_ptr(conf->percpu, cpu);
+ spin_lock(&percpu->lock);
if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) {
ops_run_biofill(sh);
overlap_clear++;
@@ -1471,7 +1472,8 @@ static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request)
if (test_and_clear_bit(R5_Overlap, &dev->flags))
wake_up(&sh->raid_conf->wait_for_overlap);
}
- put_cpu();
+ spin_unlock(&percpu->lock);
+ put_cpu_light();
}
#ifdef CONFIG_MULTICORE_RAID456
@@ -5139,6 +5141,7 @@ static int raid5_alloc_percpu(struct r5conf *conf)
break;
}
per_cpu_ptr(conf->percpu, cpu)->scribble = scribble;
+ spin_lock_init(&per_cpu_ptr(conf->percpu, cpu)->lock);
}
#ifdef CONFIG_HOTPLUG_CPU
conf->cpu_notify.notifier_call = raid456_cpu_notify;
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 050a334e..8a576470 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -429,6 +429,7 @@ struct r5conf {
int recovery_disabled;
/* per cpu variables */
struct raid5_percpu {
+ spinlock_t lock; /* Protection for -RT */
struct page *spare_page; /* Used when checking P/Q in raid6 */
void *scribble; /* space for constructing buffer
* lists and performing address