diff options
Diffstat (limited to 'fs/xfs/xfs_da_format.h')
-rw-r--r-- | fs/xfs/xfs_da_format.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/xfs/xfs_da_format.h b/fs/xfs/xfs_da_format.h index aeca0038a013..0a567e25cf59 100644 --- a/fs/xfs/xfs_da_format.h +++ b/fs/xfs/xfs_da_format.h | |||
@@ -551,36 +551,6 @@ struct xfs_dir3_leaf { | |||
551 | extern void xfs_dir3_leaf_hdr_from_disk(struct xfs_dir3_icleaf_hdr *to, | 551 | extern void xfs_dir3_leaf_hdr_from_disk(struct xfs_dir3_icleaf_hdr *to, |
552 | struct xfs_dir2_leaf *from); | 552 | struct xfs_dir2_leaf *from); |
553 | 553 | ||
554 | static inline int | ||
555 | xfs_dir3_leaf_hdr_size(struct xfs_dir2_leaf *lp) | ||
556 | { | ||
557 | if (lp->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || | ||
558 | lp->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)) | ||
559 | return sizeof(struct xfs_dir3_leaf_hdr); | ||
560 | return sizeof(struct xfs_dir2_leaf_hdr); | ||
561 | } | ||
562 | |||
563 | static inline int | ||
564 | xfs_dir3_max_leaf_ents(struct xfs_mount *mp, struct xfs_dir2_leaf *lp) | ||
565 | { | ||
566 | return (mp->m_dirblksize - xfs_dir3_leaf_hdr_size(lp)) / | ||
567 | (uint)sizeof(struct xfs_dir2_leaf_entry); | ||
568 | } | ||
569 | |||
570 | /* | ||
571 | * Get address of the bestcount field in the single-leaf block. | ||
572 | */ | ||
573 | static inline struct xfs_dir2_leaf_entry * | ||
574 | xfs_dir3_leaf_ents_p(struct xfs_dir2_leaf *lp) | ||
575 | { | ||
576 | if (lp->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || | ||
577 | lp->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)) { | ||
578 | struct xfs_dir3_leaf *lp3 = (struct xfs_dir3_leaf *)lp; | ||
579 | return lp3->__ents; | ||
580 | } | ||
581 | return lp->__ents; | ||
582 | } | ||
583 | |||
584 | /* | 554 | /* |
585 | * Get address of the bestcount field in the single-leaf block. | 555 | * Get address of the bestcount field in the single-leaf block. |
586 | */ | 556 | */ |