Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22b970497
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22b970497
Commits
2b8bf345
Commit
2b8bf345
authored
13 years ago
by
NeilBrown
Browse files
Options
Downloads
Patches
Plain Diff
md: remove typedefs: mdk_thread_t -> struct md_thread
Signed-off-by:
NeilBrown
<
neilb@suse.de
>
parent
fd01b88c
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
drivers/md/md.c
+7
-7
7 additions, 7 deletions
drivers/md/md.c
drivers/md/md.h
+10
-8
10 additions, 8 deletions
drivers/md/md.h
drivers/md/raid1.h
+1
-1
1 addition, 1 deletion
drivers/md/raid1.h
drivers/md/raid10.h
+1
-1
1 addition, 1 deletion
drivers/md/raid10.h
drivers/md/raid5.h
+1
-1
1 addition, 1 deletion
drivers/md/raid5.h
with
20 additions
and
18 deletions
drivers/md/md.c
+
7
−
7
View file @
2b8bf345
...
...
@@ -6362,7 +6362,7 @@ static const struct block_device_operations md_fops =
static
int
md_thread
(
void
*
arg
)
{
md
k
_thread
_t
*
thread
=
arg
;
struct
md_thread
*
thread
=
arg
;
/*
* md_thread is a 'system-thread', it's priority should be very
...
...
@@ -6401,7 +6401,7 @@ static int md_thread(void * arg)
return
0
;
}
void
md_wakeup_thread
(
md
k
_thread
_t
*
thread
)
void
md_wakeup_thread
(
struct
md_thread
*
thread
)
{
if
(
thread
)
{
pr_debug
(
"md: waking up MD thread %s.
\n
"
,
thread
->
tsk
->
comm
);
...
...
@@ -6410,12 +6410,12 @@ void md_wakeup_thread(mdk_thread_t *thread)
}
}
md
k
_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
)
{
md
k
_thread
_t
*
thread
;
struct
md_thread
*
thread
;
thread
=
kzalloc
(
sizeof
(
md
k
_thread
_t
),
GFP_KERNEL
);
thread
=
kzalloc
(
sizeof
(
struct
md_thread
),
GFP_KERNEL
);
if
(
!
thread
)
return
NULL
;
...
...
@@ -6435,9 +6435,9 @@ mdk_thread_t *md_register_thread(void (*run) (struct mddev *), struct mddev *mdd
return
thread
;
}
void
md_unregister_thread
(
md
k
_thread
_t
**
threadp
)
void
md_unregister_thread
(
struct
md_thread
**
threadp
)
{
md
k
_thread
_t
*
thread
=
*
threadp
;
struct
md_thread
*
thread
=
*
threadp
;
if
(
!
thread
)
return
;
pr_debug
(
"interrupting MD-thread pid %d
\n
"
,
task_pid_nr
(
thread
->
tsk
));
...
...
This diff is collapsed.
Click to expand it.
drivers/md/md.h
+
10
−
8
View file @
2b8bf345
...
...
@@ -251,8 +251,8 @@ struct mddev {
atomic_t
plug_cnt
;
/* If device is expecting
* more bios soon.
*/
struct
md
k
_thread
_s
*
thread
;
/* management thread */
struct
md
k
_thread
_s
*
sync_thread
;
/* doing resync or reconstruct */
struct
md_thread
*
thread
;
/* management thread */
struct
md_thread
*
sync_thread
;
/* doing resync or reconstruct */
sector_t
curr_resync
;
/* last block scheduled */
/* As resync requests can complete out of order, we cannot easily track
* 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) \
list_for_each_entry_rcu(rdev, &((mddev)->disks), same_set)
typedef
struct
md
k
_thread
_s
{
struct
md_thread
{
void
(
*
run
)
(
struct
mddev
*
mddev
);
struct
mddev
*
mddev
;
wait_queue_head_t
wqueue
;
unsigned
long
flags
;
struct
task_struct
*
tsk
;
unsigned
long
timeout
;
}
mdk_thread_t
;
};
#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
unregister_md_personality
(
struct
mdk_personality
*
p
);
extern
mdk_thread_t
*
md_register_thread
(
void
(
*
run
)
(
struct
mddev
*
mddev
),
struct
mddev
*
mddev
,
const
char
*
name
);
extern
void
md_unregister_thread
(
mdk_thread_t
**
threadp
);
extern
void
md_wakeup_thread
(
mdk_thread_t
*
thread
);
extern
struct
md_thread
*
md_register_thread
(
void
(
*
run
)(
struct
mddev
*
mddev
),
struct
mddev
*
mddev
,
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_write_start
(
struct
mddev
*
mddev
,
struct
bio
*
bi
);
extern
void
md_write_end
(
struct
mddev
*
mddev
);
...
...
This diff is collapsed.
Click to expand it.
drivers/md/raid1.h
+
1
−
1
View file @
2b8bf345
...
...
@@ -92,7 +92,7 @@ struct r1_private_data_s {
/* When taking over an array from a different personality, we store
* the new thread here until we fully activate the array.
*/
struct
md
k
_thread
_s
*
thread
;
struct
md_thread
*
thread
;
};
typedef
struct
r1_private_data_s
conf_t
;
...
...
This diff is collapsed.
Click to expand it.
drivers/md/raid10.h
+
1
−
1
View file @
2b8bf345
...
...
@@ -68,7 +68,7 @@ struct r10_private_data_s {
/* When taking over an array from a different personality, we store
* the new thread here until we fully activate the array.
*/
struct
md
k
_thread
_s
*
thread
;
struct
md_thread
*
thread
;
};
typedef
struct
r10_private_data_s
conf_t
;
...
...
This diff is collapsed.
Click to expand it.
drivers/md/raid5.h
+
1
−
1
View file @
2b8bf345
...
...
@@ -436,7 +436,7 @@ struct raid5_private_data {
/* When taking over an array from a different personality, we store
* the new thread here until we fully activate the array.
*/
struct
md
k
_thread
_s
*
thread
;
struct
md_thread
*
thread
;
};
typedef
struct
raid5_private_data
raid5_conf_t
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment