Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8f1ae43d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8f1ae43d
编写于
10月 11, 2011
作者:
N
NeilBrown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
md/faulty: remove typedef: conf_t -> struct faulty_conf
Signed-off-by:
N
NeilBrown
<
neilb@suse.de
>
上级
a7120771
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
10 deletion
+10
-10
drivers/md/faulty.c
drivers/md/faulty.c
+10
-10
未找到文件。
drivers/md/faulty.c
浏览文件 @
8f1ae43d
...
...
@@ -81,16 +81,16 @@ static void faulty_fail(struct bio *bio, int error)
bio_io_error
(
b
);
}
typedef
struct
faulty_conf
{
struct
faulty_conf
{
int
period
[
Modes
];
atomic_t
counters
[
Modes
];
sector_t
faults
[
MaxFault
];
int
modes
[
MaxFault
];
int
nfaults
;
struct
md_rdev
*
rdev
;
}
conf_t
;
};
static
int
check_mode
(
conf_t
*
conf
,
int
mode
)
static
int
check_mode
(
struct
faulty_conf
*
conf
,
int
mode
)
{
if
(
conf
->
period
[
mode
]
==
0
&&
atomic_read
(
&
conf
->
counters
[
mode
])
<=
0
)
...
...
@@ -105,7 +105,7 @@ static int check_mode(conf_t *conf, int mode)
return
0
;
}
static
int
check_sector
(
conf_t
*
conf
,
sector_t
start
,
sector_t
end
,
int
dir
)
static
int
check_sector
(
struct
faulty_conf
*
conf
,
sector_t
start
,
sector_t
end
,
int
dir
)
{
/* If we find a ReadFixable sector, we fix it ... */
int
i
;
...
...
@@ -129,7 +129,7 @@ static int check_sector(conf_t *conf, sector_t start, sector_t end, int dir)
return
0
;
}
static
void
add_sector
(
conf_t
*
conf
,
sector_t
start
,
int
mode
)
static
void
add_sector
(
struct
faulty_conf
*
conf
,
sector_t
start
,
int
mode
)
{
int
i
;
int
n
=
conf
->
nfaults
;
...
...
@@ -171,7 +171,7 @@ static void add_sector(conf_t *conf, sector_t start, int mode)
static
int
make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
{
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
int
failit
=
0
;
if
(
bio_data_dir
(
bio
)
==
WRITE
)
{
...
...
@@ -224,7 +224,7 @@ static int make_request(struct mddev *mddev, struct bio *bio)
static
void
status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
{
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
int
n
;
if
((
n
=
atomic_read
(
&
conf
->
counters
[
WriteTransient
]))
!=
0
)
...
...
@@ -259,7 +259,7 @@ static int reshape(struct mddev *mddev)
{
int
mode
=
mddev
->
new_layout
&
ModeMask
;
int
count
=
mddev
->
new_layout
>>
ModeShift
;
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
if
(
mddev
->
new_layout
<
0
)
return
0
;
...
...
@@ -299,7 +299,7 @@ static int run(struct mddev *mddev)
{
struct
md_rdev
*
rdev
;
int
i
;
conf_t
*
conf
;
struct
faulty_conf
*
conf
;
if
(
md_check_no_bitmap
(
mddev
))
return
-
EINVAL
;
...
...
@@ -327,7 +327,7 @@ static int run(struct mddev *mddev)
static
int
stop
(
struct
mddev
*
mddev
)
{
conf_t
*
conf
=
mddev
->
private
;
struct
faulty_conf
*
conf
=
mddev
->
private
;
kfree
(
conf
);
mddev
->
private
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录