Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
2b8bf345
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
2b8bf345
编写于
10月 11, 2011
作者:
N
NeilBrown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
md: remove typedefs: mdk_thread_t -> struct md_thread
Signed-off-by:
N
NeilBrown
<
neilb@suse.de
>
上级
fd01b88c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
18 deletion
+20
-18
drivers/md/md.c
drivers/md/md.c
+7
-7
drivers/md/md.h
drivers/md/md.h
+10
-8
drivers/md/raid1.h
drivers/md/raid1.h
+1
-1
drivers/md/raid10.h
drivers/md/raid10.h
+1
-1
drivers/md/raid5.h
drivers/md/raid5.h
+1
-1
未找到文件。
drivers/md/md.c
浏览文件 @
2b8bf345
...
@@ -6362,7 +6362,7 @@ static const struct block_device_operations md_fops =
...
@@ -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)
...
@@ -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)
...
@@ -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
...
@@ -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
));
...
...
drivers/md/md.h
浏览文件 @
2b8bf345
...
@@ -251,8 +251,8 @@ struct mddev {
...
@@ -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
md
k_thread_s
*
thread
;
/* management thread */
struct
md
_thread
*
thread
;
/* management thread */
struct
md
k_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)
...
@@ -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)
...
@@ -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
);
...
...
drivers/md/raid1.h
浏览文件 @
2b8bf345
...
@@ -92,7 +92,7 @@ struct r1_private_data_s {
...
@@ -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
md
k_thread_s
*
thread
;
struct
md
_thread
*
thread
;
};
};
typedef
struct
r1_private_data_s
conf_t
;
typedef
struct
r1_private_data_s
conf_t
;
...
...
drivers/md/raid10.h
浏览文件 @
2b8bf345
...
@@ -68,7 +68,7 @@ struct r10_private_data_s {
...
@@ -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
md
k_thread_s
*
thread
;
struct
md
_thread
*
thread
;
};
};
typedef
struct
r10_private_data_s
conf_t
;
typedef
struct
r10_private_data_s
conf_t
;
...
...
drivers/md/raid5.h
浏览文件 @
2b8bf345
...
@@ -436,7 +436,7 @@ struct raid5_private_data {
...
@@ -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
md
k_thread_s
*
thread
;
struct
md
_thread
*
thread
;
};
};
typedef
struct
raid5_private_data
raid5_conf_t
;
typedef
struct
raid5_private_data
raid5_conf_t
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录