md: remove typedefs: mdk_thread_t -> struct md_thread
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
@@ -6362,7 +6362,7 @@ static const struct block_device_operations md_fops =
|
|||||||
|
|
||||||
static int md_thread(void * arg)
|
static int md_thread(void * arg)
|
||||||
{
|
{
|
||||||
mdk_thread_t *thread = arg;
|
struct md_thread *thread = arg;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* md_thread is a 'system-thread', it's priority should be very
|
* md_thread is a 'system-thread', it's priority should be very
|
||||||
@@ -6401,7 +6401,7 @@ static int md_thread(void * arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void md_wakeup_thread(mdk_thread_t *thread)
|
void md_wakeup_thread(struct md_thread *thread)
|
||||||
{
|
{
|
||||||
if (thread) {
|
if (thread) {
|
||||||
pr_debug("md: waking up MD thread %s.\n", thread->tsk->comm);
|
pr_debug("md: waking up MD thread %s.\n", thread->tsk->comm);
|
||||||
@@ -6410,12 +6410,12 @@ void md_wakeup_thread(mdk_thread_t *thread)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mdk_thread_t *md_register_thread(void (*run) (struct mddev *), struct mddev *mddev,
|
struct md_thread *md_register_thread(void (*run) (struct mddev *), struct mddev *mddev,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
mdk_thread_t *thread;
|
struct md_thread *thread;
|
||||||
|
|
||||||
thread = kzalloc(sizeof(mdk_thread_t), GFP_KERNEL);
|
thread = kzalloc(sizeof(struct md_thread), GFP_KERNEL);
|
||||||
if (!thread)
|
if (!thread)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -6435,9 +6435,9 @@ mdk_thread_t *md_register_thread(void (*run) (struct mddev *), struct mddev *mdd
|
|||||||
return thread;
|
return thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
void md_unregister_thread(mdk_thread_t **threadp)
|
void md_unregister_thread(struct md_thread **threadp)
|
||||||
{
|
{
|
||||||
mdk_thread_t *thread = *threadp;
|
struct md_thread *thread = *threadp;
|
||||||
if (!thread)
|
if (!thread)
|
||||||
return;
|
return;
|
||||||
pr_debug("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk));
|
pr_debug("interrupting MD-thread pid %d\n", task_pid_nr(thread->tsk));
|
||||||
|
@@ -251,8 +251,8 @@ struct mddev {
|
|||||||
atomic_t plug_cnt; /* If device is expecting
|
atomic_t plug_cnt; /* If device is expecting
|
||||||
* more bios soon.
|
* more bios soon.
|
||||||
*/
|
*/
|
||||||
struct mdk_thread_s *thread; /* management thread */
|
struct md_thread *thread; /* management thread */
|
||||||
struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */
|
struct md_thread *sync_thread; /* doing resync or reconstruct */
|
||||||
sector_t curr_resync; /* last block scheduled */
|
sector_t curr_resync; /* last block scheduled */
|
||||||
/* As resync requests can complete out of order, we cannot easily track
|
/* As resync requests can complete out of order, we cannot easily track
|
||||||
* how much resync has been completed. So we occasionally pause until
|
* 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)
|
|||||||
#define rdev_for_each_rcu(rdev, mddev) \
|
#define rdev_for_each_rcu(rdev, mddev) \
|
||||||
list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set)
|
list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set)
|
||||||
|
|
||||||
typedef struct mdk_thread_s {
|
struct md_thread {
|
||||||
void (*run) (struct mddev *mddev);
|
void (*run) (struct mddev *mddev);
|
||||||
struct mddev *mddev;
|
struct mddev *mddev;
|
||||||
wait_queue_head_t wqueue;
|
wait_queue_head_t wqueue;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct task_struct *tsk;
|
struct task_struct *tsk;
|
||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
} mdk_thread_t;
|
};
|
||||||
|
|
||||||
#define THREAD_WAKEUP 0
|
#define THREAD_WAKEUP 0
|
||||||
|
|
||||||
@@ -553,10 +553,12 @@ static inline void safe_put_page(struct page *p)
|
|||||||
|
|
||||||
extern int register_md_personality(struct mdk_personality *p);
|
extern int register_md_personality(struct mdk_personality *p);
|
||||||
extern int unregister_md_personality(struct mdk_personality *p);
|
extern int unregister_md_personality(struct mdk_personality *p);
|
||||||
extern mdk_thread_t * md_register_thread(void (*run) (struct mddev *mddev),
|
extern struct md_thread *md_register_thread(
|
||||||
struct mddev *mddev, const char *name);
|
void (*run)(struct mddev *mddev),
|
||||||
extern void md_unregister_thread(mdk_thread_t **threadp);
|
struct mddev *mddev,
|
||||||
extern void md_wakeup_thread(mdk_thread_t *thread);
|
const char *name);
|
||||||
|
extern void md_unregister_thread(struct md_thread **threadp);
|
||||||
|
extern void md_wakeup_thread(struct md_thread *thread);
|
||||||
extern void md_check_recovery(struct mddev *mddev);
|
extern void md_check_recovery(struct mddev *mddev);
|
||||||
extern void md_write_start(struct mddev *mddev, struct bio *bi);
|
extern void md_write_start(struct mddev *mddev, struct bio *bi);
|
||||||
extern void md_write_end(struct mddev *mddev);
|
extern void md_write_end(struct mddev *mddev);
|
||||||
|
@@ -92,7 +92,7 @@ struct r1_private_data_s {
|
|||||||
/* When taking over an array from a different personality, we store
|
/* When taking over an array from a different personality, we store
|
||||||
* the new thread here until we fully activate the array.
|
* the new thread here until we fully activate the array.
|
||||||
*/
|
*/
|
||||||
struct mdk_thread_s *thread;
|
struct md_thread *thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct r1_private_data_s conf_t;
|
typedef struct r1_private_data_s conf_t;
|
||||||
|
@@ -68,7 +68,7 @@ struct r10_private_data_s {
|
|||||||
/* When taking over an array from a different personality, we store
|
/* When taking over an array from a different personality, we store
|
||||||
* the new thread here until we fully activate the array.
|
* the new thread here until we fully activate the array.
|
||||||
*/
|
*/
|
||||||
struct mdk_thread_s *thread;
|
struct md_thread *thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct r10_private_data_s conf_t;
|
typedef struct r10_private_data_s conf_t;
|
||||||
|
@@ -436,7 +436,7 @@ struct raid5_private_data {
|
|||||||
/* When taking over an array from a different personality, we store
|
/* When taking over an array from a different personality, we store
|
||||||
* the new thread here until we fully activate the array.
|
* the new thread here until we fully activate the array.
|
||||||
*/
|
*/
|
||||||
struct mdk_thread_s *thread;
|
struct md_thread *thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct raid5_private_data raid5_conf_t;
|
typedef struct raid5_private_data raid5_conf_t;
|
||||||
|
Reference in New Issue
Block a user