summaryrefslogtreecommitdiff
path: root/drivers/md/raid5.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-04-06 16:51:31 +0200
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2018-10-29 18:20:09 +0100
commit41af63d100cf4edbcb28b2d2fef4f7dab06647ab (patch)
treea65accf29e2196c327b43d87961bd30f0a38542d /drivers/md/raid5.h
parent6cb4a177280f32e044bc7cbaebef0a2c8bc15d7c (diff)
md: raid5: Make raid5_percpu handling RT aware
__raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic spews on RT. Serialize the access to the percpu data with a lock and keep the code preemptible. Reported-by: Udo van den Heuvel <udovdh@xs4all.nl> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Udo van den Heuvel <udovdh@xs4all.nl>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r--drivers/md/raid5.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 8474c224127b..a3bf907ab2af 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -637,6 +637,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 */
struct flex_array *scribble; /* space for constructing buffer
* lists and performing address