Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f6371617
Commit
f6371617
authored
Jul 20, 2016
by
Dave Chinner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xfs-4.8-misc-fixes-3' into for-next
parents
f477cedc
ad70328a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
31 deletions
+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
No files found.
fs/xfs/libxfs/xfs_btree.c
View file @
f6371617
fs/xfs/libxfs/xfs_format.h
View file @
f6371617
...
@@ -1435,12 +1435,8 @@ typedef __be64 xfs_bmbt_ptr_t, xfs_bmdr_ptr_t;
...
@@ -1435,12 +1435,8 @@ typedef __be64 xfs_bmbt_ptr_t, xfs_bmdr_ptr_t;
* with the crc feature bit, and all accesses to them must be conditional on
* with the crc feature bit, and all accesses to them must be conditional on
* that flag.
* that flag.
*/
*/
struct
xfs_btree_block
{
/* short form block header */
__be32
bb_magic
;
/* magic number for block type */
struct
xfs_btree_block_shdr
{
__be16
bb_level
;
/* 0 is a leaf */
__be16
bb_numrecs
;
/* current # of data records */
union
{
struct
{
__be32
bb_leftsib
;
__be32
bb_leftsib
;
__be32
bb_rightsib
;
__be32
bb_rightsib
;
...
@@ -1449,8 +1445,10 @@ struct xfs_btree_block {
...
@@ -1449,8 +1445,10 @@ struct xfs_btree_block {
uuid_t
bb_uuid
;
uuid_t
bb_uuid
;
__be32
bb_owner
;
__be32
bb_owner
;
__le32
bb_crc
;
__le32
bb_crc
;
}
s
;
/* short form pointers */
};
struct
{
/* long form block header */
struct
xfs_btree_block_lhdr
{
__be64
bb_leftsib
;
__be64
bb_leftsib
;
__be64
bb_rightsib
;
__be64
bb_rightsib
;
...
@@ -1460,16 +1458,34 @@ struct xfs_btree_block {
...
@@ -1460,16 +1458,34 @@ struct xfs_btree_block {
__be64
bb_owner
;
__be64
bb_owner
;
__le32
bb_crc
;
__le32
bb_crc
;
__be32
bb_pad
;
/* padding for alignment */
__be32
bb_pad
;
/* padding for alignment */
}
l
;
/* long form pointers */
};
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
xfs_btree_block_shdr
s
;
struct
xfs_btree_block_lhdr
l
;
}
bb_u
;
/* rest */
}
bb_u
;
/* rest */
};
};
#define XFS_BTREE_SBLOCK_LEN 16
/* size of a short form block */
/* size of a short form block */
#define XFS_BTREE_LBLOCK_LEN 24
/* size of a long 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 */
/* sizes of CRC enabled btree blocks */
#define XFS_BTREE_SBLOCK_CRC_LEN (XFS_BTREE_SBLOCK_LEN + 40)
#define XFS_BTREE_SBLOCK_CRC_LEN \
#define XFS_BTREE_LBLOCK_CRC_LEN (XFS_BTREE_LBLOCK_LEN + 48)
(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 \
#define XFS_BTREE_SBLOCK_CRC_OFF \
offsetof(struct xfs_btree_block, bb_u.s.bb_crc)
offsetof(struct xfs_btree_block, bb_u.s.bb_crc)
...
...
fs/xfs/xfs_error.c
View file @
f6371617
...
@@ -55,7 +55,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
...
@@ -55,7 +55,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
}
}
int
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
i
;
int
len
;
int
len
;
...
...
fs/xfs/xfs_error.h
View file @
f6371617
...
@@ -128,7 +128,7 @@ extern int xfs_error_test(int, int *, char *, int, char *, unsigned long);
...
@@ -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__, \
xfs_error_test((tag), (mp)->m_fixedfsid, "expr", __LINE__, __FILE__, \
(rf))))
(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
);
extern
int
xfs_errortag_clearall
(
struct
xfs_mount
*
mp
,
int
loud
);
#else
#else
#define XFS_TEST_ERROR(expr, mp, tag, rf) (expr)
#define XFS_TEST_ERROR(expr, mp, tag, rf) (expr)
...
...
fs/xfs/xfs_ioctl.c
View file @
f6371617
...
@@ -1575,6 +1575,17 @@ xfs_ioc_swapext(
...
@@ -1575,6 +1575,17 @@ xfs_ioc_swapext(
goto
out_put_tmp_file
;
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
));
ip
=
XFS_I
(
file_inode
(
f
.
file
));
tip
=
XFS_I
(
file_inode
(
tmp
.
file
));
tip
=
XFS_I
(
file_inode
(
tmp
.
file
));
...
...
fs/xfs/xfs_ondisk.h
View file @
f6371617
...
@@ -39,6 +39,8 @@ xfs_check_ondisk_structs(void)
...
@@ -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_key
,
8
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_bmbt_rec
,
16
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_bmbt_rec
,
16
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_bmdr_block
,
4
);
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_btree_block
,
72
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_dinode
,
176
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_dinode
,
176
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_disk_dquot
,
104
);
XFS_CHECK_STRUCT_SIZE
(
struct
xfs_disk_dquot
,
104
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment