Lines Matching refs:hdr

85 	struct xfs_dir3_icleaf_hdr *hdr,  in xfs_dir3_leaf_check_int()  argument
102 if (!hdr) { in xfs_dir3_leaf_check_int()
104 hdr = &leafhdr; in xfs_dir3_leaf_check_int()
115 if (hdr->count > ops->leaf_max_ents(geo)) in xfs_dir3_leaf_check_int()
119 if ((hdr->magic == XFS_DIR2_LEAF1_MAGIC || in xfs_dir3_leaf_check_int()
120 hdr->magic == XFS_DIR3_LEAF1_MAGIC) && in xfs_dir3_leaf_check_int()
121 (char *)&ents[hdr->count] > (char *)xfs_dir2_leaf_bests_p(ltp)) in xfs_dir3_leaf_check_int()
125 for (i = stale = 0; i < hdr->count; i++) { in xfs_dir3_leaf_check_int()
126 if (i + 1 < hdr->count) { in xfs_dir3_leaf_check_int()
134 if (hdr->stale != stale) in xfs_dir3_leaf_check_int()
161 if (leaf3->info.hdr.magic != cpu_to_be16(magic3)) in xfs_dir3_leaf_verify()
168 if (leaf->hdr.info.magic != cpu_to_be16(magic)) in xfs_dir3_leaf_verify()
308 leaf3->info.hdr.magic = (type == XFS_DIR2_LEAF1_MAGIC) in xfs_dir3_leaf_init()
316 leaf->hdr.info.magic = cpu_to_be16(type); in xfs_dir3_leaf_init()
376 xfs_dir2_data_hdr_t *hdr; /* block header */ in xfs_dir2_block_to_leaf() local
414 hdr = dbp->b_addr; in xfs_dir2_block_to_leaf()
416 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_to_leaf()
418 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_block_to_leaf()
443 (xfs_dir2_data_aoff_t)((char *)blp - (char *)hdr), in xfs_dir2_block_to_leaf()
444 (xfs_dir2_data_aoff_t)((char *)hdr + args->geo->blksize - in xfs_dir2_block_to_leaf()
452 if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC)) in xfs_dir2_block_to_leaf()
453 hdr->magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC); in xfs_dir2_block_to_leaf()
455 hdr->magic = cpu_to_be32(XFS_DIR3_DATA_MAGIC); in xfs_dir2_block_to_leaf()
458 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_block_to_leaf()
607 xfs_dir2_data_hdr_t *hdr; /* data block header */ in xfs_dir2_leaf_addname() local
818 hdr = dbp->b_addr; in xfs_dir2_leaf_addname()
819 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_addname()
834 hdr = dbp->b_addr; in xfs_dir2_leaf_addname()
835 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_addname()
842 ((char *)hdr + be16_to_cpu(bf[0].offset)); in xfs_dir2_leaf_addname()
849 (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr), length, in xfs_dir2_leaf_addname()
860 *tagp = cpu_to_be16((char *)dep - (char *)hdr); in xfs_dir2_leaf_addname()
865 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_leaf_addname()
1063 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_bests()
1064 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC)); in xfs_dir3_leaf_log_bests()
1089 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_ents()
1090 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || in xfs_dir3_leaf_log_ents()
1091 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || in xfs_dir3_leaf_log_ents()
1092 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)); in xfs_dir3_leaf_log_ents()
1112 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_header()
1113 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || in xfs_dir3_leaf_log_header()
1114 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || in xfs_dir3_leaf_log_header()
1115 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)); in xfs_dir3_leaf_log_header()
1118 (uint)((char *)&leaf->hdr - (char *)leaf), in xfs_dir3_leaf_log_header()
1133 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_tail()
1134 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || in xfs_dir3_leaf_log_tail()
1135 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || in xfs_dir3_leaf_log_tail()
1136 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)); in xfs_dir3_leaf_log_tail()
1341 xfs_dir2_data_hdr_t *hdr; /* data block header */ in xfs_dir2_leaf_removename() local
1370 hdr = dbp->b_addr; in xfs_dir2_leaf_removename()
1372 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_removename()
1380 dep = (xfs_dir2_data_entry_t *)((char *)hdr + in xfs_dir2_leaf_removename()
1391 (xfs_dir2_data_aoff_t)((char *)dep - (char *)hdr), in xfs_dir2_leaf_removename()
1408 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_leaf_removename()
1617 struct xfs_dir2_data_hdr *hdr = dbp->b_addr; in xfs_dir2_leaf_trim_data() local
1618 struct xfs_dir2_data_free *bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_trim_data()
1620 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_leaf_trim_data()
1621 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC)); in xfs_dir2_leaf_trim_data()
1649 struct xfs_dir3_icleaf_hdr *hdr, in xfs_dir3_leaf_size() argument
1655 entries = hdr->count - hdr->stale; in xfs_dir3_leaf_size()
1656 if (hdr->magic == XFS_DIR2_LEAF1_MAGIC || in xfs_dir3_leaf_size()
1657 hdr->magic == XFS_DIR2_LEAFN_MAGIC) in xfs_dir3_leaf_size()