Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
9eed04cd
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9eed04cd
编写于
5月 09, 2011
作者:
S
Steven Whitehouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GFS2: Move final part of inode.c into super.c
Now inode.c is empty. Signed-off-by:
N
Steven Whitehouse
<
swhiteho@redhat.com
>
上级
194c011f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
36 addition
and
36 deletion
+36
-36
fs/gfs2/inode.c
fs/gfs2/inode.c
+0
-36
fs/gfs2/super.c
fs/gfs2/super.c
+36
-0
未找到文件。
fs/gfs2/inode.c
浏览文件 @
9eed04cd
...
...
@@ -36,39 +36,3 @@
#include "util.h"
void
gfs2_dinode_out
(
const
struct
gfs2_inode
*
ip
,
void
*
buf
)
{
struct
gfs2_dinode
*
str
=
buf
;
str
->
di_header
.
mh_magic
=
cpu_to_be32
(
GFS2_MAGIC
);
str
->
di_header
.
mh_type
=
cpu_to_be32
(
GFS2_METATYPE_DI
);
str
->
di_header
.
mh_format
=
cpu_to_be32
(
GFS2_FORMAT_DI
);
str
->
di_num
.
no_addr
=
cpu_to_be64
(
ip
->
i_no_addr
);
str
->
di_num
.
no_formal_ino
=
cpu_to_be64
(
ip
->
i_no_formal_ino
);
str
->
di_mode
=
cpu_to_be32
(
ip
->
i_inode
.
i_mode
);
str
->
di_uid
=
cpu_to_be32
(
ip
->
i_inode
.
i_uid
);
str
->
di_gid
=
cpu_to_be32
(
ip
->
i_inode
.
i_gid
);
str
->
di_nlink
=
cpu_to_be32
(
ip
->
i_inode
.
i_nlink
);
str
->
di_size
=
cpu_to_be64
(
i_size_read
(
&
ip
->
i_inode
));
str
->
di_blocks
=
cpu_to_be64
(
gfs2_get_inode_blocks
(
&
ip
->
i_inode
));
str
->
di_atime
=
cpu_to_be64
(
ip
->
i_inode
.
i_atime
.
tv_sec
);
str
->
di_mtime
=
cpu_to_be64
(
ip
->
i_inode
.
i_mtime
.
tv_sec
);
str
->
di_ctime
=
cpu_to_be64
(
ip
->
i_inode
.
i_ctime
.
tv_sec
);
str
->
di_goal_meta
=
cpu_to_be64
(
ip
->
i_goal
);
str
->
di_goal_data
=
cpu_to_be64
(
ip
->
i_goal
);
str
->
di_generation
=
cpu_to_be64
(
ip
->
i_generation
);
str
->
di_flags
=
cpu_to_be32
(
ip
->
i_diskflags
);
str
->
di_height
=
cpu_to_be16
(
ip
->
i_height
);
str
->
di_payload_format
=
cpu_to_be32
(
S_ISDIR
(
ip
->
i_inode
.
i_mode
)
&&
!
(
ip
->
i_diskflags
&
GFS2_DIF_EXHASH
)
?
GFS2_FORMAT_DE
:
0
);
str
->
di_depth
=
cpu_to_be16
(
ip
->
i_depth
);
str
->
di_entries
=
cpu_to_be32
(
ip
->
i_entries
);
str
->
di_eattr
=
cpu_to_be64
(
ip
->
i_eattr
);
str
->
di_atime_nsec
=
cpu_to_be32
(
ip
->
i_inode
.
i_atime
.
tv_nsec
);
str
->
di_mtime_nsec
=
cpu_to_be32
(
ip
->
i_inode
.
i_mtime
.
tv_nsec
);
str
->
di_ctime_nsec
=
cpu_to_be32
(
ip
->
i_inode
.
i_ctime
.
tv_nsec
);
}
fs/gfs2/super.c
浏览文件 @
9eed04cd
...
...
@@ -701,6 +701,42 @@ void gfs2_unfreeze_fs(struct gfs2_sbd *sdp)
mutex_unlock
(
&
sdp
->
sd_freeze_lock
);
}
void
gfs2_dinode_out
(
const
struct
gfs2_inode
*
ip
,
void
*
buf
)
{
struct
gfs2_dinode
*
str
=
buf
;
str
->
di_header
.
mh_magic
=
cpu_to_be32
(
GFS2_MAGIC
);
str
->
di_header
.
mh_type
=
cpu_to_be32
(
GFS2_METATYPE_DI
);
str
->
di_header
.
mh_format
=
cpu_to_be32
(
GFS2_FORMAT_DI
);
str
->
di_num
.
no_addr
=
cpu_to_be64
(
ip
->
i_no_addr
);
str
->
di_num
.
no_formal_ino
=
cpu_to_be64
(
ip
->
i_no_formal_ino
);
str
->
di_mode
=
cpu_to_be32
(
ip
->
i_inode
.
i_mode
);
str
->
di_uid
=
cpu_to_be32
(
ip
->
i_inode
.
i_uid
);
str
->
di_gid
=
cpu_to_be32
(
ip
->
i_inode
.
i_gid
);
str
->
di_nlink
=
cpu_to_be32
(
ip
->
i_inode
.
i_nlink
);
str
->
di_size
=
cpu_to_be64
(
i_size_read
(
&
ip
->
i_inode
));
str
->
di_blocks
=
cpu_to_be64
(
gfs2_get_inode_blocks
(
&
ip
->
i_inode
));
str
->
di_atime
=
cpu_to_be64
(
ip
->
i_inode
.
i_atime
.
tv_sec
);
str
->
di_mtime
=
cpu_to_be64
(
ip
->
i_inode
.
i_mtime
.
tv_sec
);
str
->
di_ctime
=
cpu_to_be64
(
ip
->
i_inode
.
i_ctime
.
tv_sec
);
str
->
di_goal_meta
=
cpu_to_be64
(
ip
->
i_goal
);
str
->
di_goal_data
=
cpu_to_be64
(
ip
->
i_goal
);
str
->
di_generation
=
cpu_to_be64
(
ip
->
i_generation
);
str
->
di_flags
=
cpu_to_be32
(
ip
->
i_diskflags
);
str
->
di_height
=
cpu_to_be16
(
ip
->
i_height
);
str
->
di_payload_format
=
cpu_to_be32
(
S_ISDIR
(
ip
->
i_inode
.
i_mode
)
&&
!
(
ip
->
i_diskflags
&
GFS2_DIF_EXHASH
)
?
GFS2_FORMAT_DE
:
0
);
str
->
di_depth
=
cpu_to_be16
(
ip
->
i_depth
);
str
->
di_entries
=
cpu_to_be32
(
ip
->
i_entries
);
str
->
di_eattr
=
cpu_to_be64
(
ip
->
i_eattr
);
str
->
di_atime_nsec
=
cpu_to_be32
(
ip
->
i_inode
.
i_atime
.
tv_nsec
);
str
->
di_mtime_nsec
=
cpu_to_be32
(
ip
->
i_inode
.
i_mtime
.
tv_nsec
);
str
->
di_ctime_nsec
=
cpu_to_be32
(
ip
->
i_inode
.
i_ctime
.
tv_nsec
);
}
/**
* gfs2_write_inode - Make sure the inode is stable on the disk
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录