Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
69724e28
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看板
提交
69724e28
编写于
10月 11, 2011
作者:
N
NeilBrown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
md/multipath: typedef removal: multipath_conf_t -> struct mpconf
Signed-off-by:
N
NeilBrown
<
neilb@suse.de
>
上级
e849b938
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
18 deletion
+16
-18
drivers/md/multipath.c
drivers/md/multipath.c
+15
-15
drivers/md/multipath.h
drivers/md/multipath.h
+1
-3
未找到文件。
drivers/md/multipath.c
浏览文件 @
69724e28
...
...
@@ -31,7 +31,7 @@
#define NR_RESERVED_BUFS 32
static
int
multipath_map
(
multipath_conf_t
*
conf
)
static
int
multipath_map
(
struct
mpconf
*
conf
)
{
int
i
,
disks
=
conf
->
raid_disks
;
...
...
@@ -59,7 +59,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
{
unsigned
long
flags
;
struct
mddev
*
mddev
=
mp_bh
->
mddev
;
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
spin_lock_irqsave
(
&
conf
->
device_lock
,
flags
);
list_add
(
&
mp_bh
->
retry_list
,
&
conf
->
retry_list
);
...
...
@@ -76,7 +76,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
static
void
multipath_end_bh_io
(
struct
multipath_bh
*
mp_bh
,
int
err
)
{
struct
bio
*
bio
=
mp_bh
->
master_bio
;
multipath_conf_t
*
conf
=
mp_bh
->
mddev
->
private
;
struct
mpconf
*
conf
=
mp_bh
->
mddev
->
private
;
bio_endio
(
bio
,
err
);
mempool_free
(
mp_bh
,
conf
->
pool
);
...
...
@@ -86,7 +86,7 @@ static void multipath_end_request(struct bio *bio, int error)
{
int
uptodate
=
test_bit
(
BIO_UPTODATE
,
&
bio
->
bi_flags
);
struct
multipath_bh
*
mp_bh
=
bio
->
bi_private
;
multipath_conf_t
*
conf
=
mp_bh
->
mddev
->
private
;
struct
mpconf
*
conf
=
mp_bh
->
mddev
->
private
;
struct
md_rdev
*
rdev
=
conf
->
multipaths
[
mp_bh
->
path
].
rdev
;
if
(
uptodate
)
...
...
@@ -108,7 +108,7 @@ static void multipath_end_request(struct bio *bio, int error)
static
int
multipath_make_request
(
struct
mddev
*
mddev
,
struct
bio
*
bio
)
{
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
struct
multipath_bh
*
mp_bh
;
struct
multipath_info
*
multipath
;
...
...
@@ -142,7 +142,7 @@ static int multipath_make_request(struct mddev *mddev, struct bio * bio)
static
void
multipath_status
(
struct
seq_file
*
seq
,
struct
mddev
*
mddev
)
{
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
int
i
;
seq_printf
(
seq
,
" [%d/%d] ["
,
conf
->
raid_disks
,
...
...
@@ -157,7 +157,7 @@ static void multipath_status (struct seq_file *seq, struct mddev *mddev)
static
int
multipath_congested
(
void
*
data
,
int
bits
)
{
struct
mddev
*
mddev
=
data
;
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
int
i
,
ret
=
0
;
if
(
mddev_congested
(
mddev
,
bits
))
...
...
@@ -185,7 +185,7 @@ static int multipath_congested(void *data, int bits)
*/
static
void
multipath_error
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
{
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
char
b
[
BDEVNAME_SIZE
];
if
(
conf
->
raid_disks
-
mddev
->
degraded
<=
1
)
{
...
...
@@ -218,7 +218,7 @@ static void multipath_error (struct mddev *mddev, struct md_rdev *rdev)
conf
->
raid_disks
-
mddev
->
degraded
);
}
static
void
print_multipath_conf
(
multipath_conf_t
*
conf
)
static
void
print_multipath_conf
(
struct
mpconf
*
conf
)
{
int
i
;
struct
multipath_info
*
tmp
;
...
...
@@ -244,7 +244,7 @@ static void print_multipath_conf (multipath_conf_t *conf)
static
int
multipath_add_disk
(
struct
mddev
*
mddev
,
struct
md_rdev
*
rdev
)
{
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
struct
request_queue
*
q
;
int
err
=
-
EEXIST
;
int
path
;
...
...
@@ -293,7 +293,7 @@ static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev)
static
int
multipath_remove_disk
(
struct
mddev
*
mddev
,
int
number
)
{
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
int
err
=
0
;
struct
md_rdev
*
rdev
;
struct
multipath_info
*
p
=
conf
->
multipaths
+
number
;
...
...
@@ -340,7 +340,7 @@ static void multipathd (struct mddev *mddev)
struct
multipath_bh
*
mp_bh
;
struct
bio
*
bio
;
unsigned
long
flags
;
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
struct
list_head
*
head
=
&
conf
->
retry_list
;
md_check_recovery
(
mddev
);
...
...
@@ -389,7 +389,7 @@ static sector_t multipath_size(struct mddev *mddev, sector_t sectors, int raid_d
static
int
multipath_run
(
struct
mddev
*
mddev
)
{
multipath_conf_t
*
conf
;
struct
mpconf
*
conf
;
int
disk_idx
;
struct
multipath_info
*
disk
;
struct
md_rdev
*
rdev
;
...
...
@@ -409,7 +409,7 @@ static int multipath_run (struct mddev *mddev)
* should be freed in multipath_stop()]
*/
conf
=
kzalloc
(
sizeof
(
multipath_conf_t
),
GFP_KERNEL
);
conf
=
kzalloc
(
sizeof
(
struct
mpconf
),
GFP_KERNEL
);
mddev
->
private
=
conf
;
if
(
!
conf
)
{
printk
(
KERN_ERR
...
...
@@ -512,7 +512,7 @@ static int multipath_run (struct mddev *mddev)
static
int
multipath_stop
(
struct
mddev
*
mddev
)
{
multipath_conf_t
*
conf
=
mddev
->
private
;
struct
mpconf
*
conf
=
mddev
->
private
;
md_unregister_thread
(
&
mddev
->
thread
);
blk_sync_queue
(
mddev
->
queue
);
/* the unplug fn references 'conf'*/
...
...
drivers/md/multipath.h
浏览文件 @
69724e28
...
...
@@ -5,7 +5,7 @@ struct multipath_info {
struct
md_rdev
*
rdev
;
};
struct
m
ultipath_private_data
{
struct
m
pconf
{
struct
mddev
*
mddev
;
struct
multipath_info
*
multipaths
;
int
raid_disks
;
...
...
@@ -15,8 +15,6 @@ struct multipath_private_data {
mempool_t
*
pool
;
};
typedef
struct
multipath_private_data
multipath_conf_t
;
/*
* this is our 'private' 'collective' MULTIPATH buffer head.
* it contains information about what kind of IO operations were started
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录