diff options
-rw-r--r-- | drivers/md/md.c | 14 | ||||
-rw-r--r-- | drivers/md/md.h | 18 | ||||
-rw-r--r-- | drivers/md/raid1.h | 2 | ||||
-rw-r--r-- | drivers/md/raid10.h | 2 | ||||
-rw-r--r-- | drivers/md/raid5.h | 2 |
5 files changed, 20 insertions, 18 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index f378b8a39eb2..1f661bbcaefe 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -6362,7 +6362,7 @@ static const struct block_device_operations md_fops = | |||
6362 | 6362 | ||
6363 | static int md_thread(void * arg) | 6363 | static int md_thread(void * arg) |
6364 | { | 6364 | { |
6365 | mdk_thread_t *thread = arg; | 6365 | struct md_thread *thread = arg; |
6366 | 6366 | ||
6367 | /* | 6367 | /* |
6368 | * md_thread is a 'system-thread', it's priority should be very | 6368 | * md_thread is a 'system-thread', it's priority should be very |
@@ -6401,7 +6401,7 @@ static int md_thread(void * arg) | |||
6401 | return 0; | 6401 | return 0; |
6402 | } | 6402 | } |
6403 | 6403 | ||
6404 | void md_wakeup_thread(mdk_thread_t *thread) | 6404 | void md_wakeup_thread(struct md_thread *thread) |
6405 | { | 6405 | { |
6406 | if (thread) { | 6406 | if (thread) { |
6407 | pr_debug("md: waking up MD thread %s.\n", thread->tsk->comm); | 6407 | pr_debug("md: waking up MD thread %s.\n", thread->tsk->comm); |
@@ -6410,12 +6410,12 @@ void md_wakeup_thread(mdk_thread_t *thread) | |||
6410 | } | 6410 | } |
6411 | } | 6411 | } |
6412 | 6412 | ||
6413 | mdk_thread_t *md_register_thread(void (*run) (struct mddev *), struct mddev *mddev, | 6413 | struct md_thread *md_register_thread(void (*run) (struct mddev *), struct mddev *mddev, |
6414 | const char *name) | 6414 | const char *name) |
6415 | { | 6415 | { |
6416 | mdk_thread_t *thread; | 6416 | struct md_thread *thread; |
6417 | 6417 | ||
6418 | thread = kzalloc(sizeof(mdk_thread_t), GFP_KERNEL); | 6418 | thread = kzalloc(sizeof(struct md_thread), GFP_KERNEL); |
6419 | if (!thread) | 6419 | if (!thread) |
6420 | return NULL; | 6420 | return NULL; |
6421 | 6421 | ||
@@ -6435,9 +6435,9 @@ mdk_thread_t *md_register_thread(void (*run) (struct mddev *), struct mddev *mdd | |||
6435 | return thread; | 6435 | return thread; |
6436 | } | 6436 | } |
6437 | 6437 | ||
6438 | void md_unregister_thread(mdk_thread_t **threadp) | 6438 | void md_unregister_thread(struct md_thread **threadp) |
6439 | { | 6439 | { |
6440 | mdk_thread_t *thread = *threadp; | 6440 | struct md_thread *thread = *threadp; |
6441 | if (!thread) | 6441 | if (!thread) |
6442 | return; | 6442 | return; |
6443 | pr_debug("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk)); | 6443 | pr_debug("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk)); |
diff --git a/drivers/md/md.h b/drivers/md/md.h index 84a2c03c49c5..b618da59ca1c 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -251,8 +251,8 @@ struct mddev { | |||
251 | atomic_t plug_cnt; /* If device is expecting | 251 | atomic_t plug_cnt; /* If device is expecting |
252 | * more bios soon. | 252 | * more bios soon. |
253 | */ | 253 | */ |
254 | struct mdk_thread_s *thread; /* management thread */ | 254 | struct md_thread *thread; /* management thread */ |
255 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ | 255 | struct md_thread *sync_thread; /* doing resync or reconstruct */ |
256 | sector_t curr_resync; /* last block scheduled */ | 256 | sector_t curr_resync; /* last block scheduled */ |
257 | /* As resync requests can complete out of order, we cannot easily track | 257 | /* As resync requests can complete out of order, we cannot easily track |
258 | * how much resync has been completed. So we occasionally pause until | 258 | * how much resync has been completed. So we occasionally pause until |
@@ -509,14 +509,14 @@ static inline void sysfs_unlink_rdev(struct mddev *mddev, struct md_rdev *rdev) | |||
509 | #define rdev_for_each_rcu(rdev, mddev) \ | 509 | #define rdev_for_each_rcu(rdev, mddev) \ |
510 | list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set) | 510 | list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set) |
511 | 511 | ||
512 | typedef struct mdk_thread_s { | 512 | struct md_thread { |
513 | void (*run) (struct mddev *mddev); | 513 | void (*run) (struct mddev *mddev); |
514 | struct mddev *mddev; | 514 | struct mddev *mddev; |
515 | wait_queue_head_t wqueue; | 515 | wait_queue_head_t wqueue; |
516 | unsigned long flags; | 516 | unsigned long flags; |
517 | struct task_struct *tsk; | 517 | struct task_struct *tsk; |
518 | unsigned long timeout; | 518 | unsigned long timeout; |
519 | } mdk_thread_t; | 519 | }; |
520 | 520 | ||
521 | #define THREAD_WAKEUP 0 | 521 | #define THREAD_WAKEUP 0 |
522 | 522 | ||
@@ -553,10 +553,12 @@ static inline void safe_put_page(struct page *p) | |||
553 | 553 | ||
554 | extern int register_md_personality(struct mdk_personality *p); | 554 | extern int register_md_personality(struct mdk_personality *p); |
555 | extern int unregister_md_personality(struct mdk_personality *p); | 555 | extern int unregister_md_personality(struct mdk_personality *p); |
556 | extern mdk_thread_t * md_register_thread(void (*run) (struct mddev *mddev), | 556 | extern struct md_thread *md_register_thread( |
557 | struct mddev *mddev, const char *name); | 557 | void (*run)(struct mddev *mddev), |
558 | extern void md_unregister_thread(mdk_thread_t **threadp); | 558 | struct mddev *mddev, |
559 | extern void md_wakeup_thread(mdk_thread_t *thread); | 559 | const char *name); |
560 | extern void md_unregister_thread(struct md_thread **threadp); | ||
561 | extern void md_wakeup_thread(struct md_thread *thread); | ||
560 | extern void md_check_recovery(struct mddev *mddev); | 562 | extern void md_check_recovery(struct mddev *mddev); |
561 | extern void md_write_start(struct mddev *mddev, struct bio *bi); | 563 | extern void md_write_start(struct mddev *mddev, struct bio *bi); |
562 | extern void md_write_end(struct mddev *mddev); | 564 | extern void md_write_end(struct mddev *mddev); |
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index b6bc7b1c589d..07e9cb91186b 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h | |||
@@ -92,7 +92,7 @@ struct r1_private_data_s { | |||
92 | /* When taking over an array from a different personality, we store | 92 | /* When taking over an array from a different personality, we store |
93 | * the new thread here until we fully activate the array. | 93 | * the new thread here until we fully activate the array. |
94 | */ | 94 | */ |
95 | struct mdk_thread_s *thread; | 95 | struct md_thread *thread; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | typedef struct r1_private_data_s conf_t; | 98 | typedef struct r1_private_data_s conf_t; |
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index ad2da69becbe..c7721365f7bd 100644 --- a/drivers/md/raid10.h +++ b/drivers/md/raid10.h | |||
@@ -68,7 +68,7 @@ struct r10_private_data_s { | |||
68 | /* When taking over an array from a different personality, we store | 68 | /* When taking over an array from a different personality, we store |
69 | * the new thread here until we fully activate the array. | 69 | * the new thread here until we fully activate the array. |
70 | */ | 70 | */ |
71 | struct mdk_thread_s *thread; | 71 | struct md_thread *thread; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | typedef struct r10_private_data_s conf_t; | 74 | typedef struct r10_private_data_s conf_t; |
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index 0d222de5e5be..cf4702ccf73a 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h | |||
@@ -436,7 +436,7 @@ struct raid5_private_data { | |||
436 | /* When taking over an array from a different personality, we store | 436 | /* When taking over an array from a different personality, we store |
437 | * the new thread here until we fully activate the array. | 437 | * the new thread here until we fully activate the array. |
438 | */ | 438 | */ |
439 | struct mdk_thread_s *thread; | 439 | struct md_thread *thread; |
440 | }; | 440 | }; |
441 | 441 | ||
442 | typedef struct raid5_private_data raid5_conf_t; | 442 | typedef struct raid5_private_data raid5_conf_t; |