diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-08-12 06:49:31 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-12 17:35:41 -0400 |
commit | d386b32b553ce145fb40f0d9360b6e5a79b5a80c (patch) | |
tree | e00135dfc377ec6b4f8a7f48e6e39b33bd842199 /fs/xfs | |
parent | 76456fc2a6fe3a31c492a072413925eebc68cc98 (diff) |
xfs: sync minor header differences needed by userspace.
Little things like exported functions, __KERNEL__ protections, and
so on that ensure user and kernel shared headers are identical.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_attr.c | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_attr_leaf.c | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_attr_leaf.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_attr_remote.c | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_btree.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_dir2_format.h | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_fs.h | 17 | ||||
-rw-r--r-- | fs/xfs/xfs_sb.h | 7 | ||||
-rw-r--r-- | fs/xfs/xfs_symlink.h | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_trans.h | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_priv.h | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_types.h | 3 |
13 files changed, 42 insertions, 8 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 27a48bb07249..0d92e21ca33c 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "xfs_bit.h" | 21 | #include "xfs_bit.h" |
22 | #include "xfs_log.h" | 22 | #include "xfs_log.h" |
23 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
24 | #include "xfs_trans_priv.h" | ||
24 | #include "xfs_sb.h" | 25 | #include "xfs_sb.h" |
25 | #include "xfs_ag.h" | 26 | #include "xfs_ag.h" |
26 | #include "xfs_mount.h" | 27 | #include "xfs_mount.h" |
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index b800fbcafc7f..e6497d0c2a72 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "xfs_bit.h" | 22 | #include "xfs_bit.h" |
23 | #include "xfs_log.h" | 23 | #include "xfs_log.h" |
24 | #include "xfs_trans.h" | 24 | #include "xfs_trans.h" |
25 | #include "xfs_trans_priv.h" | ||
25 | #include "xfs_sb.h" | 26 | #include "xfs_sb.h" |
26 | #include "xfs_ag.h" | 27 | #include "xfs_ag.h" |
27 | #include "xfs_mount.h" | 28 | #include "xfs_mount.h" |
diff --git a/fs/xfs/xfs_attr_leaf.h b/fs/xfs/xfs_attr_leaf.h index 444a7704596c..c1022138c7e6 100644 --- a/fs/xfs/xfs_attr_leaf.h +++ b/fs/xfs/xfs_attr_leaf.h | |||
@@ -333,6 +333,8 @@ int xfs_attr3_leaf_read(struct xfs_trans *tp, struct xfs_inode *dp, | |||
333 | struct xfs_buf **bpp); | 333 | struct xfs_buf **bpp); |
334 | void xfs_attr3_leaf_hdr_from_disk(struct xfs_attr3_icleaf_hdr *to, | 334 | void xfs_attr3_leaf_hdr_from_disk(struct xfs_attr3_icleaf_hdr *to, |
335 | struct xfs_attr_leafblock *from); | 335 | struct xfs_attr_leafblock *from); |
336 | void xfs_attr3_leaf_hdr_to_disk(struct xfs_attr_leafblock *to, | ||
337 | struct xfs_attr3_icleaf_hdr *from); | ||
336 | 338 | ||
337 | extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops; | 339 | extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops; |
338 | 340 | ||
diff --git a/fs/xfs/xfs_attr_remote.c b/fs/xfs/xfs_attr_remote.c index ef6b0c124528..39a59ea1fba8 100644 --- a/fs/xfs/xfs_attr_remote.c +++ b/fs/xfs/xfs_attr_remote.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "xfs_bit.h" | 22 | #include "xfs_bit.h" |
23 | #include "xfs_log.h" | 23 | #include "xfs_log.h" |
24 | #include "xfs_trans.h" | 24 | #include "xfs_trans.h" |
25 | #include "xfs_trans_priv.h" | ||
25 | #include "xfs_sb.h" | 26 | #include "xfs_sb.h" |
26 | #include "xfs_ag.h" | 27 | #include "xfs_ag.h" |
27 | #include "xfs_mount.h" | 28 | #include "xfs_mount.h" |
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h index 1cf1292d29b7..314dca1775dc 100644 --- a/fs/xfs/xfs_bmap.h +++ b/fs/xfs/xfs_bmap.h | |||
@@ -137,9 +137,11 @@ typedef struct xfs_bmalloca { | |||
137 | char conv; /* overwriting unwritten extents */ | 137 | char conv; /* overwriting unwritten extents */ |
138 | char stack_switch; | 138 | char stack_switch; |
139 | int flags; | 139 | int flags; |
140 | #ifdef __KERNEL__ | ||
140 | struct completion *done; | 141 | struct completion *done; |
141 | struct work_struct work; | 142 | struct work_struct work; |
142 | int result; | 143 | int result; |
144 | #endif /* __KERNEL__ */ | ||
143 | } xfs_bmalloca_t; | 145 | } xfs_bmalloca_t; |
144 | 146 | ||
145 | /* | 147 | /* |
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index 55e3c7cc3c3d..c8473c7ef45e 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h | |||
@@ -88,13 +88,11 @@ struct xfs_btree_block { | |||
88 | #define XFS_BTREE_SBLOCK_CRC_LEN (XFS_BTREE_SBLOCK_LEN + 40) | 88 | #define XFS_BTREE_SBLOCK_CRC_LEN (XFS_BTREE_SBLOCK_LEN + 40) |
89 | #define XFS_BTREE_LBLOCK_CRC_LEN (XFS_BTREE_LBLOCK_LEN + 48) | 89 | #define XFS_BTREE_LBLOCK_CRC_LEN (XFS_BTREE_LBLOCK_LEN + 48) |
90 | 90 | ||
91 | |||
92 | #define XFS_BTREE_SBLOCK_CRC_OFF \ | 91 | #define XFS_BTREE_SBLOCK_CRC_OFF \ |
93 | offsetof(struct xfs_btree_block, bb_u.s.bb_crc) | 92 | offsetof(struct xfs_btree_block, bb_u.s.bb_crc) |
94 | #define XFS_BTREE_LBLOCK_CRC_OFF \ | 93 | #define XFS_BTREE_LBLOCK_CRC_OFF \ |
95 | offsetof(struct xfs_btree_block, bb_u.l.bb_crc) | 94 | offsetof(struct xfs_btree_block, bb_u.l.bb_crc) |
96 | 95 | ||
97 | |||
98 | /* | 96 | /* |
99 | * Generic key, ptr and record wrapper structures. | 97 | * Generic key, ptr and record wrapper structures. |
100 | * | 98 | * |
diff --git a/fs/xfs/xfs_dir2_format.h b/fs/xfs/xfs_dir2_format.h index 7826782b8d78..2095e17b75cb 100644 --- a/fs/xfs/xfs_dir2_format.h +++ b/fs/xfs/xfs_dir2_format.h | |||
@@ -519,6 +519,9 @@ struct xfs_dir3_leaf { | |||
519 | 519 | ||
520 | #define XFS_DIR3_LEAF_CRC_OFF offsetof(struct xfs_dir3_leaf_hdr, info.crc) | 520 | #define XFS_DIR3_LEAF_CRC_OFF offsetof(struct xfs_dir3_leaf_hdr, info.crc) |
521 | 521 | ||
522 | extern void xfs_dir3_leaf_hdr_from_disk(struct xfs_dir3_icleaf_hdr *to, | ||
523 | struct xfs_dir2_leaf *from); | ||
524 | |||
522 | static inline int | 525 | static inline int |
523 | xfs_dir3_leaf_hdr_size(struct xfs_dir2_leaf *lp) | 526 | xfs_dir3_leaf_hdr_size(struct xfs_dir2_leaf *lp) |
524 | { | 527 | { |
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h index d04695545397..68c2e18f7e07 100644 --- a/fs/xfs/xfs_fs.h +++ b/fs/xfs/xfs_fs.h | |||
@@ -311,6 +311,17 @@ typedef struct xfs_bstat { | |||
311 | } xfs_bstat_t; | 311 | } xfs_bstat_t; |
312 | 312 | ||
313 | /* | 313 | /* |
314 | * Project quota id helpers (previously projid was 16bit only | ||
315 | * and using two 16bit values to hold new 32bit projid was choosen | ||
316 | * to retain compatibility with "old" filesystems). | ||
317 | */ | ||
318 | static inline __uint32_t | ||
319 | bstat_get_projid(struct xfs_bstat *bs) | ||
320 | { | ||
321 | return (__uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo; | ||
322 | } | ||
323 | |||
324 | /* | ||
314 | * The user-level BulkStat Request interface structure. | 325 | * The user-level BulkStat Request interface structure. |
315 | */ | 326 | */ |
316 | typedef struct xfs_fsop_bulkreq { | 327 | typedef struct xfs_fsop_bulkreq { |
@@ -511,8 +522,14 @@ typedef struct xfs_handle { | |||
511 | #define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection) | 522 | #define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection) |
512 | #define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection) | 523 | #define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection) |
513 | /* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */ | 524 | /* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */ |
525 | |||
514 | /* XFS_IOC_FREEZE -- FIFREEZE 119 */ | 526 | /* XFS_IOC_FREEZE -- FIFREEZE 119 */ |
515 | /* XFS_IOC_THAW -- FITHAW 120 */ | 527 | /* XFS_IOC_THAW -- FITHAW 120 */ |
528 | #ifndef FIFREEZE | ||
529 | #define XFS_IOC_FREEZE _IOWR('X', 119, int) | ||
530 | #define XFS_IOC_THAW _IOWR('X', 120, int) | ||
531 | #endif | ||
532 | |||
516 | #define XFS_IOC_FSSETDM_BY_HANDLE _IOW ('X', 121, struct xfs_fsop_setdm_handlereq) | 533 | #define XFS_IOC_FSSETDM_BY_HANDLE _IOW ('X', 121, struct xfs_fsop_setdm_handlereq) |
517 | #define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq) | 534 | #define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq) |
518 | #define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq) | 535 | #define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq) |
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index a6ff9d6e72f6..40b003e47845 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h | |||
@@ -554,6 +554,13 @@ static inline int xfs_sb_version_hasprojid32bit(xfs_sb_t *sbp) | |||
554 | (sbp->sb_features2 & XFS_SB_VERSION2_PROJID32BIT)); | 554 | (sbp->sb_features2 & XFS_SB_VERSION2_PROJID32BIT)); |
555 | } | 555 | } |
556 | 556 | ||
557 | static inline void xfs_sb_version_addprojid32bit(xfs_sb_t *sbp) | ||
558 | { | ||
559 | sbp->sb_versionnum |= XFS_SB_VERSION_MOREBITSBIT; | ||
560 | sbp->sb_features2 |= XFS_SB_VERSION2_PROJID32BIT; | ||
561 | sbp->sb_bad_features2 |= XFS_SB_VERSION2_PROJID32BIT; | ||
562 | } | ||
563 | |||
557 | static inline int xfs_sb_version_hascrc(xfs_sb_t *sbp) | 564 | static inline int xfs_sb_version_hascrc(xfs_sb_t *sbp) |
558 | { | 565 | { |
559 | return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5; | 566 | return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5; |
diff --git a/fs/xfs/xfs_symlink.h b/fs/xfs/xfs_symlink.h index 374394880c01..c8e3a02f0344 100644 --- a/fs/xfs/xfs_symlink.h +++ b/fs/xfs/xfs_symlink.h | |||
@@ -49,7 +49,8 @@ struct xfs_dsymlink_hdr { | |||
49 | sizeof(struct xfs_dsymlink_hdr) : 0)) | 49 | sizeof(struct xfs_dsymlink_hdr) : 0)) |
50 | 50 | ||
51 | int xfs_symlink_blocks(struct xfs_mount *mp, int pathlen); | 51 | int xfs_symlink_blocks(struct xfs_mount *mp, int pathlen); |
52 | 52 | bool xfs_symlink_hdr_ok(struct xfs_mount *mp, xfs_ino_t ino, uint32_t offset, | |
53 | uint32_t size, struct xfs_buf *bp); | ||
53 | void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp, | 54 | void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp, |
54 | struct xfs_inode *ip, struct xfs_ifork *ifp); | 55 | struct xfs_inode *ip, struct xfs_ifork *ifp); |
55 | 56 | ||
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index ffaa5842ab1f..772d5aed90fa 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h | |||
@@ -64,7 +64,7 @@ struct xfs_log_item; | |||
64 | #define XFS_ADDAFORK_LOG_RES(mp) ((mp)->m_reservations.tr_addafork) | 64 | #define XFS_ADDAFORK_LOG_RES(mp) ((mp)->m_reservations.tr_addafork) |
65 | #define XFS_ATTRINVAL_LOG_RES(mp) ((mp)->m_reservations.tr_attrinval) | 65 | #define XFS_ATTRINVAL_LOG_RES(mp) ((mp)->m_reservations.tr_attrinval) |
66 | #define XFS_ATTRSETM_LOG_RES(mp) ((mp)->m_reservations.tr_attrsetm) | 66 | #define XFS_ATTRSETM_LOG_RES(mp) ((mp)->m_reservations.tr_attrsetm) |
67 | #define XFS_ATTRSETRT_LOG_RES(mp) ((mp)->m_reservations.tr_attrsetrt) | 67 | #define XFS_ATTRSETRT_LOG_RES(mp) ((mp)->m_reservations.tr_attrsetrt) |
68 | #define XFS_ATTRRM_LOG_RES(mp) ((mp)->m_reservations.tr_attrrm) | 68 | #define XFS_ATTRRM_LOG_RES(mp) ((mp)->m_reservations.tr_attrrm) |
69 | #define XFS_CLEAR_AGI_BUCKET_LOG_RES(mp) ((mp)->m_reservations.tr_clearagi) | 69 | #define XFS_CLEAR_AGI_BUCKET_LOG_RES(mp) ((mp)->m_reservations.tr_clearagi) |
70 | #define XFS_QM_SBCHANGE_LOG_RES(mp) ((mp)->m_reservations.tr_qm_sbchange) | 70 | #define XFS_QM_SBCHANGE_LOG_RES(mp) ((mp)->m_reservations.tr_qm_sbchange) |
@@ -325,7 +325,4 @@ extern kmem_zone_t *xfs_log_item_desc_zone; | |||
325 | 325 | ||
326 | #endif /* __KERNEL__ */ | 326 | #endif /* __KERNEL__ */ |
327 | 327 | ||
328 | void xfs_trans_init(struct xfs_mount *); | ||
329 | int xfs_trans_roll(struct xfs_trans **, struct xfs_inode *); | ||
330 | |||
331 | #endif /* __XFS_TRANS_H__ */ | 328 | #endif /* __XFS_TRANS_H__ */ |
diff --git a/fs/xfs/xfs_trans_priv.h b/fs/xfs/xfs_trans_priv.h index 53b7c9b0f8f7..d43b13004f7c 100644 --- a/fs/xfs/xfs_trans_priv.h +++ b/fs/xfs/xfs_trans_priv.h | |||
@@ -25,6 +25,9 @@ struct xfs_trans; | |||
25 | struct xfs_ail; | 25 | struct xfs_ail; |
26 | struct xfs_log_vec; | 26 | struct xfs_log_vec; |
27 | 27 | ||
28 | |||
29 | void xfs_trans_init(struct xfs_mount *); | ||
30 | int xfs_trans_roll(struct xfs_trans **, struct xfs_inode *); | ||
28 | void xfs_trans_add_item(struct xfs_trans *, struct xfs_log_item *); | 31 | void xfs_trans_add_item(struct xfs_trans *, struct xfs_log_item *); |
29 | void xfs_trans_del_item(struct xfs_log_item *); | 32 | void xfs_trans_del_item(struct xfs_log_item *); |
30 | void xfs_trans_free_items(struct xfs_trans *tp, xfs_lsn_t commit_lsn, | 33 | void xfs_trans_free_items(struct xfs_trans *tp, xfs_lsn_t commit_lsn, |
diff --git a/fs/xfs/xfs_types.h b/fs/xfs/xfs_types.h index 781772c6f192..6ed6b26585c2 100644 --- a/fs/xfs/xfs_types.h +++ b/fs/xfs/xfs_types.h | |||
@@ -32,7 +32,6 @@ typedef unsigned int __uint32_t; | |||
32 | typedef signed long long int __int64_t; | 32 | typedef signed long long int __int64_t; |
33 | typedef unsigned long long int __uint64_t; | 33 | typedef unsigned long long int __uint64_t; |
34 | 34 | ||
35 | typedef __uint32_t prid_t; /* project ID */ | ||
36 | typedef __uint32_t inst_t; /* an instruction */ | 35 | typedef __uint32_t inst_t; /* an instruction */ |
37 | 36 | ||
38 | typedef __s64 xfs_off_t; /* <file offset> type */ | 37 | typedef __s64 xfs_off_t; /* <file offset> type */ |
@@ -55,6 +54,8 @@ typedef __uint64_t __psunsigned_t; | |||
55 | 54 | ||
56 | #endif /* __KERNEL__ */ | 55 | #endif /* __KERNEL__ */ |
57 | 56 | ||
57 | typedef __uint32_t prid_t; /* project ID */ | ||
58 | |||
58 | typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ | 59 | typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ |
59 | typedef __uint32_t xfs_agino_t; /* inode # within allocation grp */ | 60 | typedef __uint32_t xfs_agino_t; /* inode # within allocation grp */ |
60 | typedef __uint32_t xfs_extlen_t; /* extent length in blocks */ | 61 | typedef __uint32_t xfs_extlen_t; /* extent length in blocks */ |