| libxfs.h | | libxfs.h | |
| | | | |
| skipping to change at line 481 | | skipping to change at line 481 | |
| xfs_lsn_t li_lsn; | | xfs_lsn_t li_lsn; | |
| } xfs_log_item_t; | | } xfs_log_item_t; | |
| | | | |
| typedef struct xfs_inode_log_item { | | typedef struct xfs_inode_log_item { | |
| xfs_log_item_t ili_item; /* common portion */ | | xfs_log_item_t ili_item; /* common portion */ | |
| struct xfs_inode *ili_inode; /* inode pointer */ | | struct xfs_inode *ili_inode; /* inode pointer */ | |
| unsigned short ili_flags; /* misc flags */ | | unsigned short ili_flags; /* misc flags */ | |
| unsigned int ili_fields; /* fields to be logg
ed */ | | unsigned int ili_fields; /* fields to be logg
ed */ | |
| unsigned int ili_last_fields; /* fields when flush
ed*/ | | unsigned int ili_last_fields; /* fields when flush
ed*/ | |
| xfs_inode_log_format_t ili_format; /* logged structure
*/ | | xfs_inode_log_format_t ili_format; /* logged structure
*/ | |
|
| int ili_lock_flags; | | | |
| } xfs_inode_log_item_t; | | } xfs_inode_log_item_t; | |
| | | | |
| typedef struct xfs_buf_log_item { | | typedef struct xfs_buf_log_item { | |
| xfs_log_item_t bli_item; /* common item structure */ | | xfs_log_item_t bli_item; /* common item structure */ | |
| struct xfs_buf *bli_buf; /* real buffer pointer */ | | struct xfs_buf *bli_buf; /* real buffer pointer */ | |
| unsigned int bli_flags; /* misc flags */ | | unsigned int bli_flags; /* misc flags */ | |
| unsigned int bli_recur; /* recursion count */ | | unsigned int bli_recur; /* recursion count */ | |
| xfs_buf_log_format_t bli_format; /* in-log header */ | | xfs_buf_log_format_t bli_format; /* in-log header */ | |
| } xfs_buf_log_item_t; | | } xfs_buf_log_item_t; | |
| | | | |
| | | | |
| skipping to change at line 536 | | skipping to change at line 535 | |
| extern xfs_trans_t *libxfs_trans_alloc (xfs_mount_t *, int); | | extern xfs_trans_t *libxfs_trans_alloc (xfs_mount_t *, int); | |
| extern xfs_trans_t *libxfs_trans_dup (xfs_trans_t *); | | extern xfs_trans_t *libxfs_trans_dup (xfs_trans_t *); | |
| extern int libxfs_trans_reserve(struct xfs_trans *, struct xfs_trans_re
s *, | | extern int libxfs_trans_reserve(struct xfs_trans *, struct xfs_trans_re
s *, | |
| uint, uint); | | uint, uint); | |
| extern int libxfs_trans_commit (xfs_trans_t *, uint); | | extern int libxfs_trans_commit (xfs_trans_t *, uint); | |
| extern void libxfs_trans_cancel (xfs_trans_t *, int); | | extern void libxfs_trans_cancel (xfs_trans_t *, int); | |
| extern xfs_buf_t *libxfs_trans_getsb (xfs_trans_t *, xfs_mount_t *, i
nt); | | extern xfs_buf_t *libxfs_trans_getsb (xfs_trans_t *, xfs_mount_t *, i
nt); | |
| | | | |
| extern int libxfs_trans_iget (xfs_mount_t *, xfs_trans_t *, xfs_ino_t, | | extern int libxfs_trans_iget (xfs_mount_t *, xfs_trans_t *, xfs_ino_t, | |
| uint, uint, struct xfs_inode **); | | uint, uint, struct xfs_inode **); | |
|
| extern void libxfs_trans_iput(xfs_trans_t *, struct xfs_inode *, uint); | | | |
| extern void libxfs_trans_ijoin (xfs_trans_t *, struct xfs_inode *, uint)
; | | extern void libxfs_trans_ijoin (xfs_trans_t *, struct xfs_inode *, uint)
; | |
|
| extern void libxfs_trans_ihold (xfs_trans_t *, struct xfs_inode *); | | | |
| extern void libxfs_trans_ijoin_ref(xfs_trans_t *, struct xfs_inode *, in
t); | | extern void libxfs_trans_ijoin_ref(xfs_trans_t *, struct xfs_inode *, in
t); | |
| extern void libxfs_trans_log_inode (xfs_trans_t *, struct xfs_inode *, | | extern void libxfs_trans_log_inode (xfs_trans_t *, struct xfs_inode *, | |
| uint); | | uint); | |
| | | | |
| extern void libxfs_trans_brelse (xfs_trans_t *, struct xfs_buf *); | | extern void libxfs_trans_brelse (xfs_trans_t *, struct xfs_buf *); | |
| extern void libxfs_trans_binval (xfs_trans_t *, struct xfs_buf *); | | extern void libxfs_trans_binval (xfs_trans_t *, struct xfs_buf *); | |
| extern void libxfs_trans_bjoin (xfs_trans_t *, struct xfs_buf *); | | extern void libxfs_trans_bjoin (xfs_trans_t *, struct xfs_buf *); | |
| extern void libxfs_trans_bhold (xfs_trans_t *, struct xfs_buf *); | | extern void libxfs_trans_bhold (xfs_trans_t *, struct xfs_buf *); | |
| extern void libxfs_trans_log_buf (xfs_trans_t *, struct xfs_buf *, | | extern void libxfs_trans_log_buf (xfs_trans_t *, struct xfs_buf *, | |
| uint, uint); | | uint, uint); | |
| | | | |
| skipping to change at line 657 | | skipping to change at line 654 | |
| struct fsxattr *, xfs_inode_t **); | | struct fsxattr *, xfs_inode_t **); | |
| extern void libxfs_trans_inode_alloc_buf (xfs_trans_t *, xfs_buf_t *); | | extern void libxfs_trans_inode_alloc_buf (xfs_trans_t *, xfs_buf_t *); | |
| | | | |
| extern void libxfs_trans_ichgtime(struct xfs_trans *, | | extern void libxfs_trans_ichgtime(struct xfs_trans *, | |
| struct xfs_inode *, int); | | struct xfs_inode *, int); | |
| extern int libxfs_iflush_int (xfs_inode_t *, xfs_buf_t *); | | extern int libxfs_iflush_int (xfs_inode_t *, xfs_buf_t *); | |
| | | | |
| /* Inode Cache Interfaces */ | | /* Inode Cache Interfaces */ | |
| extern int libxfs_iget (xfs_mount_t *, xfs_trans_t *, xfs_ino_t, | | extern int libxfs_iget (xfs_mount_t *, xfs_trans_t *, xfs_ino_t, | |
| uint, xfs_inode_t **, xfs_daddr_t); | | uint, xfs_inode_t **, xfs_daddr_t); | |
|
| extern void libxfs_iput (xfs_inode_t *, uint); | | extern void libxfs_iput (xfs_inode_t *); | |
| | | | |
| | | #define IRELE(ip) libxfs_iput(ip) | |
| | | | |
| /* Shared utility routines */ | | /* Shared utility routines */ | |
| extern unsigned int libxfs_log2_roundup(unsigned int i); | | extern unsigned int libxfs_log2_roundup(unsigned int i); | |
| | | | |
| extern int libxfs_alloc_file_space (xfs_inode_t *, xfs_off_t, | | extern int libxfs_alloc_file_space (xfs_inode_t *, xfs_off_t, | |
| xfs_off_t, int, int); | | xfs_off_t, int, int); | |
| extern int libxfs_bmap_finish(xfs_trans_t **, xfs_bmap_free_t *, int *)
; | | extern int libxfs_bmap_finish(xfs_trans_t **, xfs_bmap_free_t *, int *)
; | |
| | | | |
| extern void libxfs_fs_repair_cmn_err(int, struct xfs_mount *, char *, ..
.); | | extern void libxfs_fs_repair_cmn_err(int, struct xfs_mount *, char *, ..
.); | |
| extern void libxfs_fs_cmn_err(int, struct xfs_mount *, char *, ...); | | extern void libxfs_fs_cmn_err(int, struct xfs_mount *, char *, ...); | |
| | | | |
| skipping to change at line 760 | | skipping to change at line 759 | |
| #define libxfs_idata_realloc xfs_idata_realloc | | #define libxfs_idata_realloc xfs_idata_realloc | |
| #define libxfs_idestroy_fork xfs_idestroy_fork | | #define libxfs_idestroy_fork xfs_idestroy_fork | |
| | | | |
| #define libxfs_dinode_verify xfs_dinode_verify | | #define libxfs_dinode_verify xfs_dinode_verify | |
| bool xfs_dinode_verify(struct xfs_mount *mp, xfs_ino_t ino, | | bool xfs_dinode_verify(struct xfs_mount *mp, xfs_ino_t ino, | |
| struct xfs_dinode *dip); | | struct xfs_dinode *dip); | |
| | | | |
| /* xfs_sb.h */ | | /* xfs_sb.h */ | |
| #define libxfs_mod_sb xfs_mod_sb | | #define libxfs_mod_sb xfs_mod_sb | |
| #define libxfs_sb_from_disk xfs_sb_from_disk | | #define libxfs_sb_from_disk xfs_sb_from_disk | |
|
| | | #define libxfs_sb_quota_from_disk xfs_sb_quota_from_disk | |
| #define libxfs_sb_to_disk xfs_sb_to_disk | | #define libxfs_sb_to_disk xfs_sb_to_disk | |
| | | | |
| /* xfs_symlink.h */ | | /* xfs_symlink.h */ | |
| #define libxfs_symlink_blocks xfs_symlink_blocks | | #define libxfs_symlink_blocks xfs_symlink_blocks | |
| #define libxfs_symlink_hdr_ok xfs_symlink_hdr_ok | | #define libxfs_symlink_hdr_ok xfs_symlink_hdr_ok | |
| | | | |
| /* xfs_trans_resv.h */ | | /* xfs_trans_resv.h */ | |
| #define libxfs_trans_resv_calc xfs_trans_resv_calc | | #define libxfs_trans_resv_calc xfs_trans_resv_calc | |
| | | | |
| /* xfs_rtalloc.c */ | | /* xfs_rtalloc.c */ | |
| | | | |
End of changes. 5 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| xfs_ag.h | | xfs_ag.h | |
| | | | |
| skipping to change at line 169 | | skipping to change at line 169 | |
| * Hash table of inodes which have been unlinked but are | | * Hash table of inodes which have been unlinked but are | |
| * still being referenced. | | * still being referenced. | |
| */ | | */ | |
| __be32 agi_unlinked[XFS_AGI_UNLINKED_BUCKETS]; | | __be32 agi_unlinked[XFS_AGI_UNLINKED_BUCKETS]; | |
| | | | |
| uuid_t agi_uuid; /* uuid of filesystem */ | | uuid_t agi_uuid; /* uuid of filesystem */ | |
| __be32 agi_crc; /* crc of agi sector */ | | __be32 agi_crc; /* crc of agi sector */ | |
| __be32 agi_pad32; | | __be32 agi_pad32; | |
| __be64 agi_lsn; /* last write sequence */ | | __be64 agi_lsn; /* last write sequence */ | |
| | | | |
|
| | | __be32 agi_free_root; /* root of the free inode btree */ | |
| | | __be32 agi_free_level;/* levels in free inode btree */ | |
| | | | |
| /* structure must be padded to 64 bit alignment */ | | /* structure must be padded to 64 bit alignment */ | |
| } xfs_agi_t; | | } xfs_agi_t; | |
| | | | |
| #define XFS_AGI_CRC_OFF offsetof(struct xfs_agi, agi_crc) | | #define XFS_AGI_CRC_OFF offsetof(struct xfs_agi, agi_crc) | |
| | | | |
|
| #define XFS_AGI_MAGICNUM 0x00000001 | | #define XFS_AGI_MAGICNUM (1 << 0) | |
| #define XFS_AGI_VERSIONNUM 0x00000002 | | #define XFS_AGI_VERSIONNUM (1 << 1) | |
| #define XFS_AGI_SEQNO 0x00000004 | | #define XFS_AGI_SEQNO (1 << 2) | |
| #define XFS_AGI_LENGTH 0x00000008 | | #define XFS_AGI_LENGTH (1 << 3) | |
| #define XFS_AGI_COUNT 0x00000010 | | #define XFS_AGI_COUNT (1 << 4) | |
| #define XFS_AGI_ROOT 0x00000020 | | #define XFS_AGI_ROOT (1 << 5) | |
| #define XFS_AGI_LEVEL 0x00000040 | | #define XFS_AGI_LEVEL (1 << 6) | |
| #define XFS_AGI_FREECOUNT 0x00000080 | | #define XFS_AGI_FREECOUNT (1 << 7) | |
| #define XFS_AGI_NEWINO 0x00000100 | | #define XFS_AGI_NEWINO (1 << 8) | |
| #define XFS_AGI_DIRINO 0x00000200 | | #define XFS_AGI_DIRINO (1 << 9) | |
| #define XFS_AGI_UNLINKED 0x00000400 | | #define XFS_AGI_UNLINKED (1 << 10) | |
| #define XFS_AGI_NUM_BITS 11 | | #define XFS_AGI_NUM_BITS_R1 11 /* end of the 1st agi loggin | |
| #define XFS_AGI_ALL_BITS ((1 << XFS_AGI_NUM_BITS) - 1) | | g region */ | |
| | | #define XFS_AGI_ALL_BITS_R1 ((1 << XFS_AGI_NUM_BITS_R1) - 1) | |
| | | #define XFS_AGI_FREE_ROOT (1 << 11) | |
| | | #define XFS_AGI_FREE_LEVEL (1 << 12) | |
| | | #define XFS_AGI_NUM_BITS_R2 13 | |
| | | | |
| /* disk block (xfs_daddr_t) in the AG */ | | /* disk block (xfs_daddr_t) in the AG */ | |
| #define XFS_AGI_DADDR(mp) ((xfs_daddr_t)(2 << (mp)->m_sectbb_log)) | | #define XFS_AGI_DADDR(mp) ((xfs_daddr_t)(2 << (mp)->m_sectbb_log)) | |
| #define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) | | #define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) | |
| #define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)((bp)->b_addr)) | | #define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)((bp)->b_addr)) | |
| | | | |
| extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp, | | extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp, | |
| xfs_agnumber_t agno, struct xfs_buf **bpp); | | xfs_agnumber_t agno, struct xfs_buf **bpp); | |
| | | | |
| /* | | /* | |
| | | | |
End of changes. 2 change blocks. |
| 13 lines changed or deleted | | 20 lines changed or added | |
|
| xfs_btree.h | | xfs_btree.h | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| * This nonsense is to make -wlint happy. | | * This nonsense is to make -wlint happy. | |
| */ | | */ | |
| #define XFS_LOOKUP_EQ ((xfs_lookup_t)XFS_LOOKUP_EQi) | | #define XFS_LOOKUP_EQ ((xfs_lookup_t)XFS_LOOKUP_EQi) | |
| #define XFS_LOOKUP_LE ((xfs_lookup_t)XFS_LOOKUP_LEi) | | #define XFS_LOOKUP_LE ((xfs_lookup_t)XFS_LOOKUP_LEi) | |
| #define XFS_LOOKUP_GE ((xfs_lookup_t)XFS_LOOKUP_GEi) | | #define XFS_LOOKUP_GE ((xfs_lookup_t)XFS_LOOKUP_GEi) | |
| | | | |
| #define XFS_BTNUM_BNO ((xfs_btnum_t)XFS_BTNUM_BNOi) | | #define XFS_BTNUM_BNO ((xfs_btnum_t)XFS_BTNUM_BNOi) | |
| #define XFS_BTNUM_CNT ((xfs_btnum_t)XFS_BTNUM_CNTi) | | #define XFS_BTNUM_CNT ((xfs_btnum_t)XFS_BTNUM_CNTi) | |
| #define XFS_BTNUM_BMAP ((xfs_btnum_t)XFS_BTNUM_BMAPi) | | #define XFS_BTNUM_BMAP ((xfs_btnum_t)XFS_BTNUM_BMAPi) | |
| #define XFS_BTNUM_INO ((xfs_btnum_t)XFS_BTNUM_INOi) | | #define XFS_BTNUM_INO ((xfs_btnum_t)XFS_BTNUM_INOi) | |
|
| | | #define XFS_BTNUM_FINO ((xfs_btnum_t)XFS_BTNUM_FINOi) | |
| | | | |
| /* | | /* | |
| * For logging record fields. | | * For logging record fields. | |
| */ | | */ | |
| #define XFS_BB_MAGIC (1 << 0) | | #define XFS_BB_MAGIC (1 << 0) | |
| #define XFS_BB_LEVEL (1 << 1) | | #define XFS_BB_LEVEL (1 << 1) | |
| #define XFS_BB_NUMRECS (1 << 2) | | #define XFS_BB_NUMRECS (1 << 2) | |
| #define XFS_BB_LEFTSIB (1 << 3) | | #define XFS_BB_LEFTSIB (1 << 3) | |
| #define XFS_BB_RIGHTSIB (1 << 4) | | #define XFS_BB_RIGHTSIB (1 << 4) | |
| #define XFS_BB_BLKNO (1 << 5) | | #define XFS_BB_BLKNO (1 << 5) | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 71 | |
| */ | | */ | |
| #define __XFS_BTREE_STATS_INC(type, stat) \ | | #define __XFS_BTREE_STATS_INC(type, stat) \ | |
| XFS_STATS_INC(xs_ ## type ## _2_ ## stat) | | XFS_STATS_INC(xs_ ## type ## _2_ ## stat) | |
| #define XFS_BTREE_STATS_INC(cur, stat) \ | | #define XFS_BTREE_STATS_INC(cur, stat) \ | |
| do { \ | | do { \ | |
| switch (cur->bc_btnum) { \ | | switch (cur->bc_btnum) { \ | |
| case XFS_BTNUM_BNO: __XFS_BTREE_STATS_INC(abtb, stat); break; \ | | case XFS_BTNUM_BNO: __XFS_BTREE_STATS_INC(abtb, stat); break; \ | |
| case XFS_BTNUM_CNT: __XFS_BTREE_STATS_INC(abtc, stat); break; \ | | case XFS_BTNUM_CNT: __XFS_BTREE_STATS_INC(abtc, stat); break; \ | |
| case XFS_BTNUM_BMAP: __XFS_BTREE_STATS_INC(bmbt, stat); break; \ | | case XFS_BTNUM_BMAP: __XFS_BTREE_STATS_INC(bmbt, stat); break; \ | |
| case XFS_BTNUM_INO: __XFS_BTREE_STATS_INC(ibt, stat); break; \ | | case XFS_BTNUM_INO: __XFS_BTREE_STATS_INC(ibt, stat); break; \ | |
|
| | | case XFS_BTNUM_FINO: __XFS_BTREE_STATS_INC(fibt, stat); break; \ | |
| case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break; \ | | case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break; \ | |
| } \ | | } \ | |
| } while (0) | | } while (0) | |
| | | | |
| #define __XFS_BTREE_STATS_ADD(type, stat, val) \ | | #define __XFS_BTREE_STATS_ADD(type, stat, val) \ | |
| XFS_STATS_ADD(xs_ ## type ## _2_ ## stat, val) | | XFS_STATS_ADD(xs_ ## type ## _2_ ## stat, val) | |
| #define XFS_BTREE_STATS_ADD(cur, stat, val) \ | | #define XFS_BTREE_STATS_ADD(cur, stat, val) \ | |
| do { \ | | do { \ | |
| switch (cur->bc_btnum) { \ | | switch (cur->bc_btnum) { \ | |
| case XFS_BTNUM_BNO: __XFS_BTREE_STATS_ADD(abtb, stat, val); break; \ | | case XFS_BTNUM_BNO: __XFS_BTREE_STATS_ADD(abtb, stat, val); break; \ | |
| case XFS_BTNUM_CNT: __XFS_BTREE_STATS_ADD(abtc, stat, val); break; \ | | case XFS_BTNUM_CNT: __XFS_BTREE_STATS_ADD(abtc, stat, val); break; \ | |
| case XFS_BTNUM_BMAP: __XFS_BTREE_STATS_ADD(bmbt, stat, val); break;
\ | | case XFS_BTNUM_BMAP: __XFS_BTREE_STATS_ADD(bmbt, stat, val); break;
\ | |
| case XFS_BTNUM_INO: __XFS_BTREE_STATS_ADD(ibt, stat, val); break; \ | | case XFS_BTNUM_INO: __XFS_BTREE_STATS_ADD(ibt, stat, val); break; \ | |
|
| | | case XFS_BTNUM_FINO: __XFS_BTREE_STATS_ADD(fibt, stat, val); break;
\ | |
| case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break; \ | | case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break; \ | |
| } \ | | } \ | |
| } while (0) | | } while (0) | |
| | | | |
| #define XFS_BTREE_MAXLEVELS 8 /* max of all btrees */ | | #define XFS_BTREE_MAXLEVELS 8 /* max of all btrees */ | |
| | | | |
| struct xfs_btree_ops { | | struct xfs_btree_ops { | |
| /* size of the key and record structures */ | | /* size of the key and record structures */ | |
| size_t key_len; | | size_t key_len; | |
| size_t rec_len; | | size_t rec_len; | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 3 lines changed or added | |
|
| xfs_format.h | | xfs_format.h | |
| | | | |
| skipping to change at line 203 | | skipping to change at line 203 | |
| #define XFS_BNO_BLOCK(mp) ((xfs_agblock_t)(XFS_AGFL_BLOCK(mp)
+ 1)) | | #define XFS_BNO_BLOCK(mp) ((xfs_agblock_t)(XFS_AGFL_BLOCK(mp)
+ 1)) | |
| #define XFS_CNT_BLOCK(mp) ((xfs_agblock_t)(XFS_BNO_BLOCK(mp) +
1)) | | #define XFS_CNT_BLOCK(mp) ((xfs_agblock_t)(XFS_BNO_BLOCK(mp) +
1)) | |
| | | | |
| /* | | /* | |
| * Inode Allocation Btree format definitions | | * Inode Allocation Btree format definitions | |
| * | | * | |
| * There is a btree for the inode map per allocation group. | | * There is a btree for the inode map per allocation group. | |
| */ | | */ | |
| #define XFS_IBT_MAGIC 0x49414254 /* 'IABT' */ | | #define XFS_IBT_MAGIC 0x49414254 /* 'IABT' */ | |
| #define XFS_IBT_CRC_MAGIC 0x49414233 /* 'IAB3' */ | | #define XFS_IBT_CRC_MAGIC 0x49414233 /* 'IAB3' */ | |
|
| | | #define XFS_FIBT_MAGIC 0x46494254 /* 'FIBT' */ | |
| | | #define XFS_FIBT_CRC_MAGIC 0x46494233 /* 'FIB3' */ | |
| | | | |
| typedef __uint64_t xfs_inofree_t; | | typedef __uint64_t xfs_inofree_t; | |
| #define XFS_INODES_PER_CHUNK (NBBY * sizeof(xfs_inofree_t
)) | | #define XFS_INODES_PER_CHUNK (NBBY * sizeof(xfs_inofree_t
)) | |
| #define XFS_INODES_PER_CHUNK_LOG (XFS_NBBYLOG + 3) | | #define XFS_INODES_PER_CHUNK_LOG (XFS_NBBYLOG + 3) | |
| #define XFS_INOBT_ALL_FREE ((xfs_inofree_t)-1) | | #define XFS_INOBT_ALL_FREE ((xfs_inofree_t)-1) | |
| #define XFS_INOBT_MASK(i) ((xfs_inofree_t)1 << (i)) | | #define XFS_INOBT_MASK(i) ((xfs_inofree_t)1 << (i)) | |
| | | | |
| static inline xfs_inofree_t xfs_inobt_maskn(int i, int n) | | static inline xfs_inofree_t xfs_inobt_maskn(int i, int n) | |
| { | | { | |
| return ((n >= XFS_INODES_PER_CHUNK ? 0 : XFS_INOBT_MASK(n)) - 1) <<
i; | | return ((n >= XFS_INODES_PER_CHUNK ? 0 : XFS_INOBT_MASK(n)) - 1) <<
i; | |
| | | | |
| skipping to change at line 244 | | skipping to change at line 246 | |
| __be32 ir_startino; /* starting inode number */ | | __be32 ir_startino; /* starting inode number */ | |
| } xfs_inobt_key_t; | | } xfs_inobt_key_t; | |
| | | | |
| /* btree pointer type */ | | /* btree pointer type */ | |
| typedef __be32 xfs_inobt_ptr_t; | | typedef __be32 xfs_inobt_ptr_t; | |
| | | | |
| /* | | /* | |
| * block numbers in the AG. | | * block numbers in the AG. | |
| */ | | */ | |
| #define XFS_IBT_BLOCK(mp) ((xfs_agblock_t)(XFS_CNT_BLO
CK(mp) + 1)) | | #define XFS_IBT_BLOCK(mp) ((xfs_agblock_t)(XFS_CNT_BLO
CK(mp) + 1)) | |
|
| #define XFS_PREALLOC_BLOCKS(mp) ((xfs_agblock_t)(XFS_IBT_BLO | | #define XFS_FIBT_BLOCK(mp) ((xfs_agblock_t)(XFS_IBT_BLO | |
| CK(mp) + 1)) | | CK(mp) + 1)) | |
| | | | |
| | | /* | |
| | | * The first data block of an AG depends on whether the filesystem was form | |
| | | atted | |
| | | * with the finobt feature. If so, account for the finobt reserved root btr | |
| | | ee | |
| | | * block. | |
| | | */ | |
| | | #define XFS_PREALLOC_BLOCKS(mp) \ | |
| | | (xfs_sb_version_hasfinobt(&((mp)->m_sb)) ? \ | |
| | | XFS_FIBT_BLOCK(mp) + 1 : \ | |
| | | XFS_IBT_BLOCK(mp) + 1) | |
| | | | |
| /* | | /* | |
| * BMAP Btree format definitions | | * BMAP Btree format definitions | |
| * | | * | |
| * This includes both the root block definition that sits inside an inode f
ork | | * This includes both the root block definition that sits inside an inode f
ork | |
| * and the record/pointer formats for the leaf/node in the blocks. | | * and the record/pointer formats for the leaf/node in the blocks. | |
| */ | | */ | |
| #define XFS_BMAP_MAGIC 0x424d4150 /* 'BMAP' */ | | #define XFS_BMAP_MAGIC 0x424d4150 /* 'BMAP' */ | |
| #define XFS_BMAP_CRC_MAGIC 0x424d4133 /* 'BMA3' */ | | #define XFS_BMAP_CRC_MAGIC 0x424d4133 /* 'BMA3' */ | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 16 lines changed or added | |
|
| xfs_fs.h | | xfs_fs.h | |
| | | | |
| skipping to change at line 241 | | skipping to change at line 241 | |
| #define XFS_FSOP_GEOM_FLAGS_EXTFLG 0x0040 /* special extent flag */ | | #define XFS_FSOP_GEOM_FLAGS_EXTFLG 0x0040 /* special extent flag */ | |
| #define XFS_FSOP_GEOM_FLAGS_DIRV2 0x0080 /* directory version 2 */ | | #define XFS_FSOP_GEOM_FLAGS_DIRV2 0x0080 /* directory version 2 */ | |
| #define XFS_FSOP_GEOM_FLAGS_LOGV2 0x0100 /* log format version 2 */ | | #define XFS_FSOP_GEOM_FLAGS_LOGV2 0x0100 /* log format version 2 */ | |
| #define XFS_FSOP_GEOM_FLAGS_SECTOR 0x0200 /* sector sizes >1BB */ | | #define XFS_FSOP_GEOM_FLAGS_SECTOR 0x0200 /* sector sizes >1BB */ | |
| #define XFS_FSOP_GEOM_FLAGS_ATTR2 0x0400 /* inline attributes rework
*/ | | #define XFS_FSOP_GEOM_FLAGS_ATTR2 0x0400 /* inline attributes rework
*/ | |
| #define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */ | | #define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */ | |
| #define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x1000 /* ASCII only CI names */ | | #define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x1000 /* ASCII only CI names */ | |
| #define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x4000 /* lazy superblock counters
*/ | | #define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x4000 /* lazy superblock counters
*/ | |
| #define XFS_FSOP_GEOM_FLAGS_V5SB 0x8000 /* version 5 superblock */ | | #define XFS_FSOP_GEOM_FLAGS_V5SB 0x8000 /* version 5 superblock */ | |
| #define XFS_FSOP_GEOM_FLAGS_FTYPE 0x10000 /* inode directory types */ | | #define XFS_FSOP_GEOM_FLAGS_FTYPE 0x10000 /* inode directory types */ | |
|
| | | #define XFS_FSOP_GEOM_FLAGS_FINOBT 0x20000 /* free inode btree */ | |
| | | | |
| /* | | /* | |
| * Minimum and maximum sizes need for growth checks. | | * Minimum and maximum sizes need for growth checks. | |
| * | | * | |
| * Block counts are in units of filesystem blocks, not basic blocks. | | * Block counts are in units of filesystem blocks, not basic blocks. | |
| */ | | */ | |
| #define XFS_MIN_AG_BLOCKS 64 | | #define XFS_MIN_AG_BLOCKS 64 | |
| #define XFS_MIN_LOG_BLOCKS 512ULL | | #define XFS_MIN_LOG_BLOCKS 512ULL | |
| #define XFS_MAX_LOG_BLOCKS (1024 * 1024ULL) | | #define XFS_MAX_LOG_BLOCKS (1024 * 1024ULL) | |
| #define XFS_MIN_LOG_BYTES (10 * 1024 * 1024ULL) | | #define XFS_MIN_LOG_BYTES (10 * 1024 * 1024ULL) | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|
| xfs_ialloc.h | | xfs_ialloc.h | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 92 | |
| * Free disk inode. Carefully avoids touching the incore inode, all | | * Free disk inode. Carefully avoids touching the incore inode, all | |
| * manipulations incore are the caller's responsibility. | | * manipulations incore are the caller's responsibility. | |
| * The on-disk inode is not changed by this operation, only the | | * The on-disk inode is not changed by this operation, only the | |
| * btree (free inode mask) is changed. | | * btree (free inode mask) is changed. | |
| */ | | */ | |
| int /* error */ | | int /* error */ | |
| xfs_difree( | | xfs_difree( | |
| struct xfs_trans *tp, /* transaction pointer */ | | struct xfs_trans *tp, /* transaction pointer */ | |
| xfs_ino_t inode, /* inode to be freed */ | | xfs_ino_t inode, /* inode to be freed */ | |
| struct xfs_bmap_free *flist, /* extents to free */ | | struct xfs_bmap_free *flist, /* extents to free */ | |
|
| int *delete, /* set if inode cluster was deleted
*/ | | int *deleted, /* set if inode cluster was deleted
*/ | |
| xfs_ino_t *first_ino); /* first inode in deleted cluster */ | | xfs_ino_t *first_ino); /* first inode in deleted cluster */ | |
| | | | |
| /* | | /* | |
| * Return the location of the inode in imap, for mapping it into a buffer. | | * Return the location of the inode in imap, for mapping it into a buffer. | |
| */ | | */ | |
| int | | int | |
| xfs_imap( | | xfs_imap( | |
| struct xfs_mount *mp, /* file system mount structure */ | | struct xfs_mount *mp, /* file system mount structure */ | |
| struct xfs_trans *tp, /* transaction pointer */ | | struct xfs_trans *tp, /* transaction pointer */ | |
| xfs_ino_t ino, /* inode to locate */ | | xfs_ino_t ino, /* inode to locate */ | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| xfs_sb.h | | xfs_sb.h | |
| | | | |
| skipping to change at line 589 | | skipping to change at line 589 | |
| #define XFS_SB_FEAT_COMPAT_ALL 0 | | #define XFS_SB_FEAT_COMPAT_ALL 0 | |
| #define XFS_SB_FEAT_COMPAT_UNKNOWN ~XFS_SB_FEAT_COMPAT_ALL | | #define XFS_SB_FEAT_COMPAT_UNKNOWN ~XFS_SB_FEAT_COMPAT_ALL | |
| static inline bool | | static inline bool | |
| xfs_sb_has_compat_feature( | | xfs_sb_has_compat_feature( | |
| struct xfs_sb *sbp, | | struct xfs_sb *sbp, | |
| __uint32_t feature) | | __uint32_t feature) | |
| { | | { | |
| return (sbp->sb_features_compat & feature) != 0; | | return (sbp->sb_features_compat & feature) != 0; | |
| } | | } | |
| | | | |
|
| #define XFS_SB_FEAT_RO_COMPAT_ALL 0 | | #define XFS_SB_FEAT_RO_COMPAT_FINOBT (1 << 0) /* free inod | |
| | | e btree */ | |
| | | #define XFS_SB_FEAT_RO_COMPAT_ALL \ | |
| | | (XFS_SB_FEAT_RO_COMPAT_FINOBT) | |
| #define XFS_SB_FEAT_RO_COMPAT_UNKNOWN ~XFS_SB_FEAT_RO_COMPAT_ALL | | #define XFS_SB_FEAT_RO_COMPAT_UNKNOWN ~XFS_SB_FEAT_RO_COMPAT_ALL | |
| static inline bool | | static inline bool | |
| xfs_sb_has_ro_compat_feature( | | xfs_sb_has_ro_compat_feature( | |
| struct xfs_sb *sbp, | | struct xfs_sb *sbp, | |
| __uint32_t feature) | | __uint32_t feature) | |
| { | | { | |
| return (sbp->sb_features_ro_compat & feature) != 0; | | return (sbp->sb_features_ro_compat & feature) != 0; | |
| } | | } | |
| | | | |
| #define XFS_SB_FEAT_INCOMPAT_FTYPE (1 << 0) /* filetype in diren
t */ | | #define XFS_SB_FEAT_INCOMPAT_FTYPE (1 << 0) /* filetype in diren
t */ | |
| | | | |
| skipping to change at line 643 | | skipping to change at line 645 | |
| } | | } | |
| | | | |
| static inline int xfs_sb_version_hasftype(struct xfs_sb *sbp) | | static inline int xfs_sb_version_hasftype(struct xfs_sb *sbp) | |
| { | | { | |
| return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 && | | return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 && | |
| xfs_sb_has_incompat_feature(sbp, XFS_SB_FEAT_INCOMPAT_FTYPE)
) || | | xfs_sb_has_incompat_feature(sbp, XFS_SB_FEAT_INCOMPAT_FTYPE)
) || | |
| (xfs_sb_version_hasmorebits(sbp) && | | (xfs_sb_version_hasmorebits(sbp) && | |
| (sbp->sb_features2 & XFS_SB_VERSION2_FTYPE)); | | (sbp->sb_features2 & XFS_SB_VERSION2_FTYPE)); | |
| } | | } | |
| | | | |
|
| | | static inline int xfs_sb_version_hasfinobt(xfs_sb_t *sbp) | |
| | | { | |
| | | return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) && | |
| | | (sbp->sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_FINOBT); | |
| | | } | |
| | | | |
| /* | | /* | |
| * end of superblock version macros | | * end of superblock version macros | |
| */ | | */ | |
| | | | |
| static inline bool | | static inline bool | |
| xfs_is_quota_inode(struct xfs_sb *sbp, xfs_ino_t ino) | | xfs_is_quota_inode(struct xfs_sb *sbp, xfs_ino_t ino) | |
| { | | { | |
| return (ino == sbp->sb_uquotino || | | return (ino == sbp->sb_uquotino || | |
| ino == sbp->sb_gquotino || | | ino == sbp->sb_gquotino || | |
| ino == sbp->sb_pquotino); | | ino == sbp->sb_pquotino); | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 10 lines changed or added | |
|
| xfs_trans_space.h | | xfs_trans_space.h | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| #define XFS_DAENTER_SPACE_RES(mp,w) \ | | #define XFS_DAENTER_SPACE_RES(mp,w) \ | |
| (XFS_DAENTER_BLOCKS(mp,w) + XFS_DAENTER_BMAPS(mp,w)) | | (XFS_DAENTER_BLOCKS(mp,w) + XFS_DAENTER_BMAPS(mp,w)) | |
| #define XFS_DAREMOVE_SPACE_RES(mp,w) XFS_DAENTER_BMAPS(mp,w) | | #define XFS_DAREMOVE_SPACE_RES(mp,w) XFS_DAENTER_BMAPS(mp,w) | |
| #define XFS_DIRENTER_MAX_SPLIT(mp,nl) 1 | | #define XFS_DIRENTER_MAX_SPLIT(mp,nl) 1 | |
| #define XFS_DIRENTER_SPACE_RES(mp,nl) \ | | #define XFS_DIRENTER_SPACE_RES(mp,nl) \ | |
| (XFS_DAENTER_SPACE_RES(mp, XFS_DATA_FORK) * \ | | (XFS_DAENTER_SPACE_RES(mp, XFS_DATA_FORK) * \ | |
| XFS_DIRENTER_MAX_SPLIT(mp,nl)) | | XFS_DIRENTER_MAX_SPLIT(mp,nl)) | |
| #define XFS_DIRREMOVE_SPACE_RES(mp) \ | | #define XFS_DIRREMOVE_SPACE_RES(mp) \ | |
| XFS_DAREMOVE_SPACE_RES(mp, XFS_DATA_FORK) | | XFS_DAREMOVE_SPACE_RES(mp, XFS_DATA_FORK) | |
| #define XFS_IALLOC_SPACE_RES(mp) \ | | #define XFS_IALLOC_SPACE_RES(mp) \ | |
|
| (XFS_IALLOC_BLOCKS(mp) + (mp)->m_in_maxlevels - 1) | | (XFS_IALLOC_BLOCKS(mp) + \ | |
| | | (xfs_sb_version_hasfinobt(&mp->m_sb) ? 2 : 1 * \ | |
| | | ((mp)->m_in_maxlevels - 1))) | |
| | | | |
| /* | | /* | |
| * Space reservation values for various transactions. | | * Space reservation values for various transactions. | |
| */ | | */ | |
| #define XFS_ADDAFORK_SPACE_RES(mp) \ | | #define XFS_ADDAFORK_SPACE_RES(mp) \ | |
| ((mp)->m_dirblkfsbs + XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK)) | | ((mp)->m_dirblkfsbs + XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK)) | |
| #define XFS_ATTRRM_SPACE_RES(mp) \ | | #define XFS_ATTRRM_SPACE_RES(mp) \ | |
| XFS_DAREMOVE_SPACE_RES(mp, XFS_ATTR_FORK) | | XFS_DAREMOVE_SPACE_RES(mp, XFS_ATTR_FORK) | |
| /* This macro is not used - see inline code in xfs_attr_set */ | | /* This macro is not used - see inline code in xfs_attr_set */ | |
| #define XFS_ATTRSET_SPACE_RES(mp, v) \ | | #define XFS_ATTRSET_SPACE_RES(mp, v) \ | |
| | | | |
| skipping to change at line 85 | | skipping to change at line 87 | |
| (XFS_EXTENTADD_SPACE_RES(mp, XFS_DATA_FORK) + \ | | (XFS_EXTENTADD_SPACE_RES(mp, XFS_DATA_FORK) + \ | |
| XFS_DQUOT_CLUSTER_SIZE_FSB) | | XFS_DQUOT_CLUSTER_SIZE_FSB) | |
| #define XFS_QM_QINOCREATE_SPACE_RES(mp) \ | | #define XFS_QM_QINOCREATE_SPACE_RES(mp) \ | |
| XFS_IALLOC_SPACE_RES(mp) | | XFS_IALLOC_SPACE_RES(mp) | |
| #define XFS_REMOVE_SPACE_RES(mp) \ | | #define XFS_REMOVE_SPACE_RES(mp) \ | |
| XFS_DIRREMOVE_SPACE_RES(mp) | | XFS_DIRREMOVE_SPACE_RES(mp) | |
| #define XFS_RENAME_SPACE_RES(mp,nl) \ | | #define XFS_RENAME_SPACE_RES(mp,nl) \ | |
| (XFS_DIRREMOVE_SPACE_RES(mp) + XFS_DIRENTER_SPACE_RES(mp,nl)) | | (XFS_DIRREMOVE_SPACE_RES(mp) + XFS_DIRENTER_SPACE_RES(mp,nl)) | |
| #define XFS_SYMLINK_SPACE_RES(mp,nl,b) \ | | #define XFS_SYMLINK_SPACE_RES(mp,nl,b) \ | |
| (XFS_IALLOC_SPACE_RES(mp) + XFS_DIRENTER_SPACE_RES(mp,nl) + (b)) | | (XFS_IALLOC_SPACE_RES(mp) + XFS_DIRENTER_SPACE_RES(mp,nl) + (b)) | |
|
| | | #define XFS_IFREE_SPACE_RES(mp) \ | |
| | | (xfs_sb_version_hasfinobt(&mp->m_sb) ? (mp)->m_in_maxlevels : 0) | |
| | | | |
| #endif /* __XFS_TRANS_SPACE_H__ */ | | #endif /* __XFS_TRANS_SPACE_H__ */ | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|