diff options
Diffstat (limited to 'fs/xfs/xfs_trans.h')
| -rw-r--r-- | fs/xfs/xfs_trans.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index 0804207c7391..74c80bd2b0ec 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h | |||
| @@ -210,62 +210,52 @@ typedef struct xfs_log_item_chunk { | |||
| 210 | * lic_unused to the right value (0 matches all free). The | 210 | * lic_unused to the right value (0 matches all free). The |
| 211 | * lic_descs.lid_index values are set up as each desc is allocated. | 211 | * lic_descs.lid_index values are set up as each desc is allocated. |
| 212 | */ | 212 | */ |
| 213 | #define XFS_LIC_INIT(cp) xfs_lic_init(cp) | ||
| 214 | static inline void xfs_lic_init(xfs_log_item_chunk_t *cp) | 213 | static inline void xfs_lic_init(xfs_log_item_chunk_t *cp) |
| 215 | { | 214 | { |
| 216 | cp->lic_free = XFS_LIC_FREEMASK; | 215 | cp->lic_free = XFS_LIC_FREEMASK; |
| 217 | } | 216 | } |
| 218 | 217 | ||
| 219 | #define XFS_LIC_INIT_SLOT(cp,slot) xfs_lic_init_slot(cp, slot) | ||
| 220 | static inline void xfs_lic_init_slot(xfs_log_item_chunk_t *cp, int slot) | 218 | static inline void xfs_lic_init_slot(xfs_log_item_chunk_t *cp, int slot) |
| 221 | { | 219 | { |
| 222 | cp->lic_descs[slot].lid_index = (unsigned char)(slot); | 220 | cp->lic_descs[slot].lid_index = (unsigned char)(slot); |
| 223 | } | 221 | } |
| 224 | 222 | ||
| 225 | #define XFS_LIC_VACANCY(cp) xfs_lic_vacancy(cp) | ||
| 226 | static inline int xfs_lic_vacancy(xfs_log_item_chunk_t *cp) | 223 | static inline int xfs_lic_vacancy(xfs_log_item_chunk_t *cp) |
| 227 | { | 224 | { |
| 228 | return cp->lic_free & XFS_LIC_FREEMASK; | 225 | return cp->lic_free & XFS_LIC_FREEMASK; |
| 229 | } | 226 | } |
| 230 | 227 | ||
| 231 | #define XFS_LIC_ALL_FREE(cp) xfs_lic_all_free(cp) | ||
| 232 | static inline void xfs_lic_all_free(xfs_log_item_chunk_t *cp) | 228 | static inline void xfs_lic_all_free(xfs_log_item_chunk_t *cp) |
| 233 | { | 229 | { |
| 234 | cp->lic_free = XFS_LIC_FREEMASK; | 230 | cp->lic_free = XFS_LIC_FREEMASK; |
| 235 | } | 231 | } |
| 236 | 232 | ||
| 237 | #define XFS_LIC_ARE_ALL_FREE(cp) xfs_lic_are_all_free(cp) | ||
| 238 | static inline int xfs_lic_are_all_free(xfs_log_item_chunk_t *cp) | 233 | static inline int xfs_lic_are_all_free(xfs_log_item_chunk_t *cp) |
| 239 | { | 234 | { |
| 240 | return ((cp->lic_free & XFS_LIC_FREEMASK) == XFS_LIC_FREEMASK); | 235 | return ((cp->lic_free & XFS_LIC_FREEMASK) == XFS_LIC_FREEMASK); |
| 241 | } | 236 | } |
| 242 | 237 | ||
| 243 | #define XFS_LIC_ISFREE(cp,slot) xfs_lic_isfree(cp,slot) | ||
| 244 | static inline int xfs_lic_isfree(xfs_log_item_chunk_t *cp, int slot) | 238 | static inline int xfs_lic_isfree(xfs_log_item_chunk_t *cp, int slot) |
| 245 | { | 239 | { |
| 246 | return (cp->lic_free & (1 << slot)); | 240 | return (cp->lic_free & (1 << slot)); |
| 247 | } | 241 | } |
| 248 | 242 | ||
| 249 | #define XFS_LIC_CLAIM(cp,slot) xfs_lic_claim(cp,slot) | ||
| 250 | static inline void xfs_lic_claim(xfs_log_item_chunk_t *cp, int slot) | 243 | static inline void xfs_lic_claim(xfs_log_item_chunk_t *cp, int slot) |
| 251 | { | 244 | { |
| 252 | cp->lic_free &= ~(1 << slot); | 245 | cp->lic_free &= ~(1 << slot); |
| 253 | } | 246 | } |
| 254 | 247 | ||
| 255 | #define XFS_LIC_RELSE(cp,slot) xfs_lic_relse(cp,slot) | ||
| 256 | static inline void xfs_lic_relse(xfs_log_item_chunk_t *cp, int slot) | 248 | static inline void xfs_lic_relse(xfs_log_item_chunk_t *cp, int slot) |
| 257 | { | 249 | { |
| 258 | cp->lic_free |= 1 << slot; | 250 | cp->lic_free |= 1 << slot; |
| 259 | } | 251 | } |
| 260 | 252 | ||
| 261 | #define XFS_LIC_SLOT(cp,slot) xfs_lic_slot(cp,slot) | ||
| 262 | static inline xfs_log_item_desc_t * | 253 | static inline xfs_log_item_desc_t * |
| 263 | xfs_lic_slot(xfs_log_item_chunk_t *cp, int slot) | 254 | xfs_lic_slot(xfs_log_item_chunk_t *cp, int slot) |
| 264 | { | 255 | { |
| 265 | return &(cp->lic_descs[slot]); | 256 | return &(cp->lic_descs[slot]); |
| 266 | } | 257 | } |
| 267 | 258 | ||
| 268 | #define XFS_LIC_DESC_TO_SLOT(dp) xfs_lic_desc_to_slot(dp) | ||
| 269 | static inline int xfs_lic_desc_to_slot(xfs_log_item_desc_t *dp) | 259 | static inline int xfs_lic_desc_to_slot(xfs_log_item_desc_t *dp) |
| 270 | { | 260 | { |
| 271 | return (uint)dp->lid_index; | 261 | return (uint)dp->lid_index; |
| @@ -278,7 +268,6 @@ static inline int xfs_lic_desc_to_slot(xfs_log_item_desc_t *dp) | |||
| 278 | * All of this yields the address of the chunk, which is | 268 | * All of this yields the address of the chunk, which is |
| 279 | * cast to a chunk pointer. | 269 | * cast to a chunk pointer. |
| 280 | */ | 270 | */ |
| 281 | #define XFS_LIC_DESC_TO_CHUNK(dp) xfs_lic_desc_to_chunk(dp) | ||
| 282 | static inline xfs_log_item_chunk_t * | 271 | static inline xfs_log_item_chunk_t * |
| 283 | xfs_lic_desc_to_chunk(xfs_log_item_desc_t *dp) | 272 | xfs_lic_desc_to_chunk(xfs_log_item_desc_t *dp) |
| 284 | { | 273 | { |
| @@ -986,6 +975,7 @@ int _xfs_trans_commit(xfs_trans_t *, | |||
| 986 | int *); | 975 | int *); |
| 987 | #define xfs_trans_commit(tp, flags) _xfs_trans_commit(tp, flags, NULL) | 976 | #define xfs_trans_commit(tp, flags) _xfs_trans_commit(tp, flags, NULL) |
| 988 | void xfs_trans_cancel(xfs_trans_t *, int); | 977 | void xfs_trans_cancel(xfs_trans_t *, int); |
| 978 | int xfs_trans_roll(struct xfs_trans **, struct xfs_inode *); | ||
| 989 | int xfs_trans_ail_init(struct xfs_mount *); | 979 | int xfs_trans_ail_init(struct xfs_mount *); |
| 990 | void xfs_trans_ail_destroy(struct xfs_mount *); | 980 | void xfs_trans_ail_destroy(struct xfs_mount *); |
| 991 | void xfs_trans_push_ail(struct xfs_mount *, xfs_lsn_t); | 981 | void xfs_trans_push_ail(struct xfs_mount *, xfs_lsn_t); |
