Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
faeff83f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
faeff83f
编写于
10月 12, 2015
作者:
G
Guoqing Jiang
提交者:
Goldwyn Rodrigues
10月 12, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
md-cluster: make other members of cluster_msg is handled by little endian funcs
Signed-off-by:
N
Guoqing Jiang
<
gqjiang@suse.com
>
上级
d216711b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
10 deletion
+14
-10
drivers/md/md-cluster.c
drivers/md/md-cluster.c
+14
-10
未找到文件。
drivers/md/md-cluster.c
浏览文件 @
faeff83f
...
...
@@ -418,7 +418,7 @@ static void process_add_new_disk(struct mddev *mddev, struct cluster_msg *cmsg)
len
=
snprintf
(
disk_uuid
,
64
,
"DEVICE_UUID="
);
sprintf
(
disk_uuid
+
len
,
"%pU"
,
cmsg
->
uuid
);
snprintf
(
raid_slot
,
16
,
"RAID_DISK=%d"
,
cmsg
->
raid_slot
);
snprintf
(
raid_slot
,
16
,
"RAID_DISK=%d"
,
le32_to_cpu
(
cmsg
->
raid_slot
)
);
pr_info
(
"%s:%d Sending kobject change with %s and %s
\n
"
,
__func__
,
__LINE__
,
disk_uuid
,
raid_slot
);
init_completion
(
&
cinfo
->
newdisk_completion
);
set_bit
(
MD_CLUSTER_WAITING_FOR_NEWDISK
,
&
cinfo
->
state
);
...
...
@@ -438,22 +438,26 @@ static void process_metadata_update(struct mddev *mddev, struct cluster_msg *msg
static
void
process_remove_disk
(
struct
mddev
*
mddev
,
struct
cluster_msg
*
msg
)
{
struct
md_rdev
*
rdev
=
md_find_rdev_nr_rcu
(
mddev
,
msg
->
raid_slot
);
struct
md_rdev
*
rdev
=
md_find_rdev_nr_rcu
(
mddev
,
le32_to_cpu
(
msg
->
raid_slot
));
if
(
rdev
)
md_kick_rdev_from_array
(
rdev
);
else
pr_warn
(
"%s: %d Could not find disk(%d) to REMOVE
\n
"
,
__func__
,
__LINE__
,
msg
->
raid_slot
);
pr_warn
(
"%s: %d Could not find disk(%d) to REMOVE
\n
"
,
__func__
,
__LINE__
,
le32_to_cpu
(
msg
->
raid_slot
));
}
static
void
process_readd_disk
(
struct
mddev
*
mddev
,
struct
cluster_msg
*
msg
)
{
struct
md_rdev
*
rdev
=
md_find_rdev_nr_rcu
(
mddev
,
msg
->
raid_slot
);
struct
md_rdev
*
rdev
=
md_find_rdev_nr_rcu
(
mddev
,
le32_to_cpu
(
msg
->
raid_slot
));
if
(
rdev
&&
test_bit
(
Faulty
,
&
rdev
->
flags
))
clear_bit
(
Faulty
,
&
rdev
->
flags
);
else
pr_warn
(
"%s: %d Could not find disk(%d) which is faulty"
,
__func__
,
__LINE__
,
msg
->
raid_slot
);
pr_warn
(
"%s: %d Could not find disk(%d) which is faulty"
,
__func__
,
__LINE__
,
le32_to_cpu
(
msg
->
raid_slot
));
}
static
void
process_recvd_msg
(
struct
mddev
*
mddev
,
struct
cluster_msg
*
msg
)
...
...
@@ -936,7 +940,7 @@ static int add_new_disk(struct mddev *mddev, struct md_rdev *rdev)
memset
(
&
cmsg
,
0
,
sizeof
(
cmsg
));
cmsg
.
type
=
cpu_to_le32
(
NEWDISK
);
memcpy
(
cmsg
.
uuid
,
uuid
,
16
);
cmsg
.
raid_slot
=
rdev
->
desc_nr
;
cmsg
.
raid_slot
=
cpu_to_le32
(
rdev
->
desc_nr
)
;
lock_comm
(
cinfo
);
ret
=
__sendmsg
(
cinfo
,
&
cmsg
);
if
(
ret
)
...
...
@@ -979,8 +983,8 @@ static int remove_disk(struct mddev *mddev, struct md_rdev *rdev)
{
struct
cluster_msg
cmsg
;
struct
md_cluster_info
*
cinfo
=
mddev
->
cluster_info
;
cmsg
.
type
=
REMOVE
;
cmsg
.
raid_slot
=
rdev
->
desc_nr
;
cmsg
.
type
=
cpu_to_le32
(
REMOVE
)
;
cmsg
.
raid_slot
=
cpu_to_le32
(
rdev
->
desc_nr
)
;
return
__sendmsg
(
cinfo
,
&
cmsg
);
}
...
...
@@ -992,8 +996,8 @@ static int gather_bitmaps(struct md_rdev *rdev)
struct
mddev
*
mddev
=
rdev
->
mddev
;
struct
md_cluster_info
*
cinfo
=
mddev
->
cluster_info
;
cmsg
.
type
=
RE_ADD
;
cmsg
.
raid_slot
=
rdev
->
desc_nr
;
cmsg
.
type
=
cpu_to_le32
(
RE_ADD
)
;
cmsg
.
raid_slot
=
cpu_to_le32
(
rdev
->
desc_nr
)
;
err
=
sendmsg
(
cinfo
,
&
cmsg
);
if
(
err
)
goto
out
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录