Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e334cf4f
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
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看板
提交
e334cf4f
编写于
7月 19, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
don't pass superblock to hypfs_diag_create_files
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
f78e41e3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
30 deletion
+26
-30
arch/s390/hypfs/hypfs.h
arch/s390/hypfs/hypfs.h
+1
-1
arch/s390/hypfs/hypfs_diag.c
arch/s390/hypfs/hypfs_diag.c
+23
-27
arch/s390/hypfs/inode.c
arch/s390/hypfs/inode.c
+2
-2
未找到文件。
arch/s390/hypfs/hypfs.h
浏览文件 @
e334cf4f
...
...
@@ -32,7 +32,7 @@ extern struct dentry *hypfs_create_str(struct super_block *sb,
/* LPAR Hypervisor */
extern
int
hypfs_diag_init
(
void
);
extern
void
hypfs_diag_exit
(
void
);
extern
int
hypfs_diag_create_files
(
struct
super_block
*
sb
,
struct
dentry
*
root
);
extern
int
hypfs_diag_create_files
(
struct
dentry
*
root
);
/* VM Hypervisor */
extern
int
hypfs_vm_init
(
void
);
...
...
arch/s390/hypfs/hypfs_diag.c
浏览文件 @
e334cf4f
...
...
@@ -623,8 +623,7 @@ void hypfs_diag_exit(void)
* *******************************************
*/
static
int
hypfs_create_cpu_files
(
struct
super_block
*
sb
,
struct
dentry
*
cpus_dir
,
void
*
cpu_info
)
static
int
hypfs_create_cpu_files
(
struct
dentry
*
cpus_dir
,
void
*
cpu_info
)
{
struct
dentry
*
cpu_dir
;
char
buffer
[
TMP_SIZE
];
...
...
@@ -632,30 +631,29 @@ static int hypfs_create_cpu_files(struct super_block *sb,
snprintf
(
buffer
,
TMP_SIZE
,
"%d"
,
cpu_info__cpu_addr
(
diag204_info_type
,
cpu_info
));
cpu_dir
=
hypfs_mkdir
(
sb
,
cpus_dir
,
buffer
);
rc
=
hypfs_create_u64
(
sb
,
cpu_dir
,
"mgmtime"
,
cpu_dir
=
hypfs_mkdir
(
cpus_dir
->
d_
sb
,
cpus_dir
,
buffer
);
rc
=
hypfs_create_u64
(
cpu_dir
->
d_
sb
,
cpu_dir
,
"mgmtime"
,
cpu_info__acc_time
(
diag204_info_type
,
cpu_info
)
-
cpu_info__lp_time
(
diag204_info_type
,
cpu_info
));
if
(
IS_ERR
(
rc
))
return
PTR_ERR
(
rc
);
rc
=
hypfs_create_u64
(
sb
,
cpu_dir
,
"cputime"
,
rc
=
hypfs_create_u64
(
cpu_dir
->
d_
sb
,
cpu_dir
,
"cputime"
,
cpu_info__lp_time
(
diag204_info_type
,
cpu_info
));
if
(
IS_ERR
(
rc
))
return
PTR_ERR
(
rc
);
if
(
diag204_info_type
==
INFO_EXT
)
{
rc
=
hypfs_create_u64
(
sb
,
cpu_dir
,
"onlinetime"
,
rc
=
hypfs_create_u64
(
cpu_dir
->
d_
sb
,
cpu_dir
,
"onlinetime"
,
cpu_info__online_time
(
diag204_info_type
,
cpu_info
));
if
(
IS_ERR
(
rc
))
return
PTR_ERR
(
rc
);
}
diag224_idx2name
(
cpu_info__ctidx
(
diag204_info_type
,
cpu_info
),
buffer
);
rc
=
hypfs_create_str
(
sb
,
cpu_dir
,
"type"
,
buffer
);
rc
=
hypfs_create_str
(
cpu_dir
->
d_
sb
,
cpu_dir
,
"type"
,
buffer
);
return
PTR_RET
(
rc
);
}
static
void
*
hypfs_create_lpar_files
(
struct
super_block
*
sb
,
struct
dentry
*
systems_dir
,
void
*
part_hdr
)
static
void
*
hypfs_create_lpar_files
(
struct
dentry
*
systems_dir
,
void
*
part_hdr
)
{
struct
dentry
*
cpus_dir
;
struct
dentry
*
lpar_dir
;
...
...
@@ -665,16 +663,16 @@ static void *hypfs_create_lpar_files(struct super_block *sb,
part_hdr__part_name
(
diag204_info_type
,
part_hdr
,
lpar_name
);
lpar_name
[
LPAR_NAME_LEN
]
=
0
;
lpar_dir
=
hypfs_mkdir
(
sb
,
systems_dir
,
lpar_name
);
lpar_dir
=
hypfs_mkdir
(
s
ystems_dir
->
d_s
b
,
systems_dir
,
lpar_name
);
if
(
IS_ERR
(
lpar_dir
))
return
lpar_dir
;
cpus_dir
=
hypfs_mkdir
(
sb
,
lpar_dir
,
"cpus"
);
cpus_dir
=
hypfs_mkdir
(
lpar_dir
->
d_
sb
,
lpar_dir
,
"cpus"
);
if
(
IS_ERR
(
cpus_dir
))
return
cpus_dir
;
cpu_info
=
part_hdr
+
part_hdr__size
(
diag204_info_type
);
for
(
i
=
0
;
i
<
part_hdr__rcpus
(
diag204_info_type
,
part_hdr
);
i
++
)
{
int
rc
;
rc
=
hypfs_create_cpu_files
(
sb
,
cpus_dir
,
cpu_info
);
rc
=
hypfs_create_cpu_files
(
cpus_dir
,
cpu_info
);
if
(
rc
)
return
ERR_PTR
(
rc
);
cpu_info
+=
cpu_info__size
(
diag204_info_type
);
...
...
@@ -682,8 +680,7 @@ static void *hypfs_create_lpar_files(struct super_block *sb,
return
cpu_info
;
}
static
int
hypfs_create_phys_cpu_files
(
struct
super_block
*
sb
,
struct
dentry
*
cpus_dir
,
void
*
cpu_info
)
static
int
hypfs_create_phys_cpu_files
(
struct
dentry
*
cpus_dir
,
void
*
cpu_info
)
{
struct
dentry
*
cpu_dir
;
char
buffer
[
TMP_SIZE
];
...
...
@@ -691,32 +688,31 @@ static int hypfs_create_phys_cpu_files(struct super_block *sb,
snprintf
(
buffer
,
TMP_SIZE
,
"%i"
,
phys_cpu__cpu_addr
(
diag204_info_type
,
cpu_info
));
cpu_dir
=
hypfs_mkdir
(
sb
,
cpus_dir
,
buffer
);
cpu_dir
=
hypfs_mkdir
(
cpus_dir
->
d_
sb
,
cpus_dir
,
buffer
);
if
(
IS_ERR
(
cpu_dir
))
return
PTR_ERR
(
cpu_dir
);
rc
=
hypfs_create_u64
(
sb
,
cpu_dir
,
"mgmtime"
,
rc
=
hypfs_create_u64
(
cpu_dir
->
d_
sb
,
cpu_dir
,
"mgmtime"
,
phys_cpu__mgm_time
(
diag204_info_type
,
cpu_info
));
if
(
IS_ERR
(
rc
))
return
PTR_ERR
(
rc
);
diag224_idx2name
(
phys_cpu__ctidx
(
diag204_info_type
,
cpu_info
),
buffer
);
rc
=
hypfs_create_str
(
sb
,
cpu_dir
,
"type"
,
buffer
);
rc
=
hypfs_create_str
(
cpu_dir
->
d_
sb
,
cpu_dir
,
"type"
,
buffer
);
return
PTR_RET
(
rc
);
}
static
void
*
hypfs_create_phys_files
(
struct
super_block
*
sb
,
struct
dentry
*
parent_dir
,
void
*
phys_hdr
)
static
void
*
hypfs_create_phys_files
(
struct
dentry
*
parent_dir
,
void
*
phys_hdr
)
{
int
i
;
void
*
cpu_info
;
struct
dentry
*
cpus_dir
;
cpus_dir
=
hypfs_mkdir
(
sb
,
parent_dir
,
"cpus"
);
cpus_dir
=
hypfs_mkdir
(
parent_dir
->
d_
sb
,
parent_dir
,
"cpus"
);
if
(
IS_ERR
(
cpus_dir
))
return
cpus_dir
;
cpu_info
=
phys_hdr
+
phys_hdr__size
(
diag204_info_type
);
for
(
i
=
0
;
i
<
phys_hdr__cpus
(
diag204_info_type
,
phys_hdr
);
i
++
)
{
int
rc
;
rc
=
hypfs_create_phys_cpu_files
(
sb
,
cpus_dir
,
cpu_info
);
rc
=
hypfs_create_phys_cpu_files
(
cpus_dir
,
cpu_info
);
if
(
rc
)
return
ERR_PTR
(
rc
);
cpu_info
+=
phys_cpu__size
(
diag204_info_type
);
...
...
@@ -724,7 +720,7 @@ static void *hypfs_create_phys_files(struct super_block *sb,
return
cpu_info
;
}
int
hypfs_diag_create_files
(
struct
super_block
*
sb
,
struct
dentry
*
root
)
int
hypfs_diag_create_files
(
struct
dentry
*
root
)
{
struct
dentry
*
systems_dir
,
*
hyp_dir
;
void
*
time_hdr
,
*
part_hdr
;
...
...
@@ -735,7 +731,7 @@ int hypfs_diag_create_files(struct super_block *sb, struct dentry *root)
if
(
IS_ERR
(
buffer
))
return
PTR_ERR
(
buffer
);
systems_dir
=
hypfs_mkdir
(
sb
,
root
,
"systems"
);
systems_dir
=
hypfs_mkdir
(
root
->
d_
sb
,
root
,
"systems"
);
if
(
IS_ERR
(
systems_dir
))
{
rc
=
PTR_ERR
(
systems_dir
);
goto
err_out
;
...
...
@@ -743,25 +739,25 @@ int hypfs_diag_create_files(struct super_block *sb, struct dentry *root)
time_hdr
=
(
struct
x_info_blk_hdr
*
)
buffer
;
part_hdr
=
time_hdr
+
info_blk_hdr__size
(
diag204_info_type
);
for
(
i
=
0
;
i
<
info_blk_hdr__npar
(
diag204_info_type
,
time_hdr
);
i
++
)
{
part_hdr
=
hypfs_create_lpar_files
(
s
b
,
s
ystems_dir
,
part_hdr
);
part_hdr
=
hypfs_create_lpar_files
(
systems_dir
,
part_hdr
);
if
(
IS_ERR
(
part_hdr
))
{
rc
=
PTR_ERR
(
part_hdr
);
goto
err_out
;
}
}
if
(
info_blk_hdr__flags
(
diag204_info_type
,
time_hdr
)
&
LPAR_PHYS_FLG
)
{
ptr
=
hypfs_create_phys_files
(
sb
,
root
,
part_hdr
);
ptr
=
hypfs_create_phys_files
(
root
,
part_hdr
);
if
(
IS_ERR
(
ptr
))
{
rc
=
PTR_ERR
(
ptr
);
goto
err_out
;
}
}
hyp_dir
=
hypfs_mkdir
(
sb
,
root
,
"hyp"
);
hyp_dir
=
hypfs_mkdir
(
root
->
d_
sb
,
root
,
"hyp"
);
if
(
IS_ERR
(
hyp_dir
))
{
rc
=
PTR_ERR
(
hyp_dir
);
goto
err_out
;
}
ptr
=
hypfs_create_str
(
sb
,
hyp_dir
,
"type"
,
"LPAR Hypervisor"
);
ptr
=
hypfs_create_str
(
root
->
d_
sb
,
hyp_dir
,
"type"
,
"LPAR Hypervisor"
);
if
(
IS_ERR
(
ptr
))
{
rc
=
PTR_ERR
(
ptr
);
goto
err_out
;
...
...
arch/s390/hypfs/inode.c
浏览文件 @
e334cf4f
...
...
@@ -195,7 +195,7 @@ static ssize_t hypfs_aio_write(struct kiocb *iocb, const struct iovec *iov,
if
(
MACHINE_IS_VM
)
rc
=
hypfs_vm_create_files
(
sb
->
s_root
);
else
rc
=
hypfs_diag_create_files
(
sb
,
sb
->
s_root
);
rc
=
hypfs_diag_create_files
(
sb
->
s_root
);
if
(
rc
)
{
pr_err
(
"Updating the hypfs tree failed
\n
"
);
hypfs_delete_tree
(
sb
->
s_root
);
...
...
@@ -304,7 +304,7 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
if
(
MACHINE_IS_VM
)
rc
=
hypfs_vm_create_files
(
root_dentry
);
else
rc
=
hypfs_diag_create_files
(
sb
,
root_dentry
);
rc
=
hypfs_diag_create_files
(
root_dentry
);
if
(
rc
)
return
rc
;
sbi
->
update_file
=
hypfs_create_update_file
(
sb
,
root_dentry
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录