Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
f6371617
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看板
提交
f6371617
编写于
7月 20, 2016
作者:
D
Dave Chinner
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'xfs-4.8-misc-fixes-3' into for-next
上级
f477cedc
ad70328a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
60 addition
and
31 deletion
+60
-31
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.c
+4
-4
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_format.h
+41
-25
fs/xfs/xfs_error.c
fs/xfs/xfs_error.c
+1
-1
fs/xfs/xfs_error.h
fs/xfs/xfs_error.h
+1
-1
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_ioctl.c
+11
-0
fs/xfs/xfs_ondisk.h
fs/xfs/xfs_ondisk.h
+2
-0
未找到文件。
fs/xfs/libxfs/xfs_btree.c
浏览文件 @
f6371617
...
...
@@ -543,12 +543,12 @@ xfs_btree_ptr_addr(
*/
STATIC
struct
xfs_btree_block
*
xfs_btree_get_iroot
(
struct
xfs_btree_cur
*
cur
)
struct
xfs_btree_cur
*
cur
)
{
struct
xfs_ifork
*
ifp
;
struct
xfs_ifork
*
ifp
;
ifp
=
XFS_IFORK_PTR
(
cur
->
bc_private
.
b
.
ip
,
cur
->
bc_private
.
b
.
whichfork
);
return
(
struct
xfs_btree_block
*
)
ifp
->
if_broot
;
ifp
=
XFS_IFORK_PTR
(
cur
->
bc_private
.
b
.
ip
,
cur
->
bc_private
.
b
.
whichfork
);
return
(
struct
xfs_btree_block
*
)
ifp
->
if_broot
;
}
/*
...
...
fs/xfs/libxfs/xfs_format.h
浏览文件 @
f6371617
...
...
@@ -1435,41 +1435,57 @@ typedef __be64 xfs_bmbt_ptr_t, xfs_bmdr_ptr_t;
* with the crc feature bit, and all accesses to them must be conditional on
* that flag.
*/
/* short form block header */
struct
xfs_btree_block_shdr
{
__be32
bb_leftsib
;
__be32
bb_rightsib
;
__be64
bb_blkno
;
__be64
bb_lsn
;
uuid_t
bb_uuid
;
__be32
bb_owner
;
__le32
bb_crc
;
};
/* long form block header */
struct
xfs_btree_block_lhdr
{
__be64
bb_leftsib
;
__be64
bb_rightsib
;
__be64
bb_blkno
;
__be64
bb_lsn
;
uuid_t
bb_uuid
;
__be64
bb_owner
;
__le32
bb_crc
;
__be32
bb_pad
;
/* padding for alignment */
};
struct
xfs_btree_block
{
__be32
bb_magic
;
/* magic number for block type */
__be16
bb_level
;
/* 0 is a leaf */
__be16
bb_numrecs
;
/* current # of data records */
union
{
struct
{
__be32
bb_leftsib
;
__be32
bb_rightsib
;
__be64
bb_blkno
;
__be64
bb_lsn
;
uuid_t
bb_uuid
;
__be32
bb_owner
;
__le32
bb_crc
;
}
s
;
/* short form pointers */
struct
{
__be64
bb_leftsib
;
__be64
bb_rightsib
;
__be64
bb_blkno
;
__be64
bb_lsn
;
uuid_t
bb_uuid
;
__be64
bb_owner
;
__le32
bb_crc
;
__be32
bb_pad
;
/* padding for alignment */
}
l
;
/* long form pointers */
struct
xfs_btree_block_shdr
s
;
struct
xfs_btree_block_lhdr
l
;
}
bb_u
;
/* rest */
};
#define XFS_BTREE_SBLOCK_LEN 16
/* size of a short form block */
#define XFS_BTREE_LBLOCK_LEN 24
/* size of a long form block */
/* size of a short form block */
#define XFS_BTREE_SBLOCK_LEN \
(offsetof(struct xfs_btree_block, bb_u) + \
offsetof(struct xfs_btree_block_shdr, bb_blkno))
/* size of a long form block */
#define XFS_BTREE_LBLOCK_LEN \
(offsetof(struct xfs_btree_block, bb_u) + \
offsetof(struct xfs_btree_block_lhdr, bb_blkno))
/* sizes of CRC enabled btree blocks */
#define XFS_BTREE_SBLOCK_CRC_LEN (XFS_BTREE_SBLOCK_LEN + 40)
#define XFS_BTREE_LBLOCK_CRC_LEN (XFS_BTREE_LBLOCK_LEN + 48)
#define XFS_BTREE_SBLOCK_CRC_LEN \
(offsetof(struct xfs_btree_block, bb_u) + \
sizeof(struct xfs_btree_block_shdr))
#define XFS_BTREE_LBLOCK_CRC_LEN \
(offsetof(struct xfs_btree_block, bb_u) + \
sizeof(struct xfs_btree_block_lhdr))
#define XFS_BTREE_SBLOCK_CRC_OFF \
offsetof(struct xfs_btree_block, bb_u.s.bb_crc)
...
...
fs/xfs/xfs_error.c
浏览文件 @
f6371617
...
...
@@ -55,7 +55,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
}
int
xfs_errortag_add
(
int
error_tag
,
xfs_mount_t
*
mp
)
xfs_errortag_add
(
unsigned
int
error_tag
,
xfs_mount_t
*
mp
)
{
int
i
;
int
len
;
...
...
fs/xfs/xfs_error.h
浏览文件 @
f6371617
...
...
@@ -128,7 +128,7 @@ extern int xfs_error_test(int, int *, char *, int, char *, unsigned long);
xfs_error_test((tag), (mp)->m_fixedfsid, "expr", __LINE__, __FILE__, \
(rf))))
extern
int
xfs_errortag_add
(
int
error_tag
,
struct
xfs_mount
*
mp
);
extern
int
xfs_errortag_add
(
unsigned
int
error_tag
,
struct
xfs_mount
*
mp
);
extern
int
xfs_errortag_clearall
(
struct
xfs_mount
*
mp
,
int
loud
);
#else
#define XFS_TEST_ERROR(expr, mp, tag, rf) (expr)
...
...
fs/xfs/xfs_ioctl.c
浏览文件 @
f6371617
...
...
@@ -1575,6 +1575,17 @@ xfs_ioc_swapext(
goto
out_put_tmp_file
;
}
/*
* We need to ensure that the fds passed in point to XFS inodes
* before we cast and access them as XFS structures as we have no
* control over what the user passes us here.
*/
if
(
f
.
file
->
f_op
!=
&
xfs_file_operations
||
tmp
.
file
->
f_op
!=
&
xfs_file_operations
)
{
error
=
-
EINVAL
;
goto
out_put_tmp_file
;
}
ip
=
XFS_I
(
file_inode
(
f
.
file
));
tip
=
XFS_I
(
file_inode
(
tmp
.
file
));
...
...
fs/xfs/xfs_ondisk.h
浏览文件 @
f6371617
...
...
@@ -39,6 +39,8 @@ xfs_check_ondisk_structs(void)
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_bmbt_key
,
8
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_bmbt_rec
,
16
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_bmdr_block
,
4
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_btree_block_shdr
,
48
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_btree_block_lhdr
,
64
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_btree_block
,
72
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_dinode
,
176
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_disk_dquot
,
104
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录