Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
e849b938
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
e849b938
编写于
10月 11, 2011
作者:
N
NeilBrown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
md/linear: typedef removal: linear_conf_t -> struct linear_conf
Signed-off-by:
N
NeilBrown
<
neilb@suse.de
>
上级
8f1ae43d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
13 deletion
+9
-13
drivers/md/linear.c
drivers/md/linear.c
+8
-8
drivers/md/linear.h
drivers/md/linear.h
+1
-5
未找到文件。
drivers/md/linear.c
浏览文件 @
e849b938
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
static
inline
struct
dev_info
*
which_dev
(
struct
mddev
*
mddev
,
sector_t
sector
)
static
inline
struct
dev_info
*
which_dev
(
struct
mddev
*
mddev
,
sector_t
sector
)
{
{
int
lo
,
mid
,
hi
;
int
lo
,
mid
,
hi
;
linear_conf_t
*
conf
;
struct
linear_conf
*
conf
;
lo
=
0
;
lo
=
0
;
hi
=
mddev
->
raid_disks
-
1
;
hi
=
mddev
->
raid_disks
-
1
;
...
@@ -90,7 +90,7 @@ static int linear_mergeable_bvec(struct request_queue *q,
...
@@ -90,7 +90,7 @@ static int linear_mergeable_bvec(struct request_queue *q,
static
int
linear_congested
(
void
*
data
,
int
bits
)
static
int
linear_congested
(
void
*
data
,
int
bits
)
{
{
struct
mddev
*
mddev
=
data
;
struct
mddev
*
mddev
=
data
;
linear_conf_t
*
conf
;
struct
linear_conf
*
conf
;
int
i
,
ret
=
0
;
int
i
,
ret
=
0
;
if
(
mddev_congested
(
mddev
,
bits
))
if
(
mddev_congested
(
mddev
,
bits
))
...
@@ -110,7 +110,7 @@ static int linear_congested(void *data, int bits)
...
@@ -110,7 +110,7 @@ static int linear_congested(void *data, int bits)
static
sector_t
linear_size
(
struct
mddev
*
mddev
,
sector_t
sectors
,
int
raid_disks
)
static
sector_t
linear_size
(
struct
mddev
*
mddev
,
sector_t
sectors
,
int
raid_disks
)
{
{
linear_conf_t
*
conf
;
struct
linear_conf
*
conf
;
sector_t
array_sectors
;
sector_t
array_sectors
;
rcu_read_lock
();
rcu_read_lock
();
...
@@ -123,9 +123,9 @@ static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disk
...
@@ -123,9 +123,9 @@ static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disk
return
array_sectors
;
return
array_sectors
;
}
}
static
linear_conf_t
*
linear_conf
(
struct
mddev
*
mddev
,
int
raid_disks
)
static
struct
linear_conf
*
linear_conf
(
struct
mddev
*
mddev
,
int
raid_disks
)
{
{
linear_conf_t
*
conf
;
struct
linear_conf
*
conf
;
struct
md_rdev
*
rdev
;
struct
md_rdev
*
rdev
;
int
i
,
cnt
;
int
i
,
cnt
;
...
@@ -196,7 +196,7 @@ static linear_conf_t *linear_conf(struct mddev *mddev, int raid_disks)
...
@@ -196,7 +196,7 @@ static linear_conf_t *linear_conf(struct mddev *mddev, int raid_disks)
static
int
linear_run
(
struct
mddev
*
mddev
)
static
int
linear_run
(
struct
mddev
*
mddev
)
{
{
linear_conf_t
*
conf
;
struct
linear_conf
*
conf
;
if
(
md_check_no_bitmap
(
mddev
))
if
(
md_check_no_bitmap
(
mddev
))
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -223,7 +223,7 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
...
@@ -223,7 +223,7 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
* The current one is never freed until the array is stopped.
* The current one is never freed until the array is stopped.
* This avoids races.
* This avoids races.
*/
*/
linear_conf_t
*
newconf
,
*
oldconf
;
struct
linear_conf
*
newconf
,
*
oldconf
;
if
(
rdev
->
saved_raid_disk
!=
mddev
->
raid_disks
)
if
(
rdev
->
saved_raid_disk
!=
mddev
->
raid_disks
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -247,7 +247,7 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
...
@@ -247,7 +247,7 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
static
int
linear_stop
(
struct
mddev
*
mddev
)
static
int
linear_stop
(
struct
mddev
*
mddev
)
{
{
linear_conf_t
*
conf
=
mddev
->
private
;
struct
linear_conf
*
conf
=
mddev
->
private
;
/*
/*
* We do not require rcu protection here since
* We do not require rcu protection here since
...
...
drivers/md/linear.h
浏览文件 @
e849b938
...
@@ -6,14 +6,10 @@ struct dev_info {
...
@@ -6,14 +6,10 @@ struct dev_info {
sector_t
end_sector
;
sector_t
end_sector
;
};
};
struct
linear_
private_data
struct
linear_
conf
{
{
struct
rcu_head
rcu
;
struct
rcu_head
rcu
;
sector_t
array_sectors
;
sector_t
array_sectors
;
struct
dev_info
disks
[
0
];
struct
dev_info
disks
[
0
];
};
};
typedef
struct
linear_private_data
linear_conf_t
;
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录