Lines Matching refs:hdr

86 	struct xfs_dir3_icleaf_hdr *hdr,  in xfs_dir3_leaf_check_int()  argument
103 if (!hdr) { in xfs_dir3_leaf_check_int()
105 hdr = &leafhdr; in xfs_dir3_leaf_check_int()
116 if (hdr->count > ops->leaf_max_ents(geo)) in xfs_dir3_leaf_check_int()
120 if ((hdr->magic == XFS_DIR2_LEAF1_MAGIC || in xfs_dir3_leaf_check_int()
121 hdr->magic == XFS_DIR3_LEAF1_MAGIC) && in xfs_dir3_leaf_check_int()
122 (char *)&ents[hdr->count] > (char *)xfs_dir2_leaf_bests_p(ltp)) in xfs_dir3_leaf_check_int()
126 for (i = stale = 0; i < hdr->count; i++) { in xfs_dir3_leaf_check_int()
127 if (i + 1 < hdr->count) { in xfs_dir3_leaf_check_int()
135 if (hdr->stale != stale) in xfs_dir3_leaf_check_int()
162 if (leaf3->info.hdr.magic != cpu_to_be16(magic3)) in xfs_dir3_leaf_verify()
171 if (leaf->hdr.info.magic != cpu_to_be16(magic)) in xfs_dir3_leaf_verify()
313 leaf3->info.hdr.magic = (type == XFS_DIR2_LEAF1_MAGIC) in xfs_dir3_leaf_init()
321 leaf->hdr.info.magic = cpu_to_be16(type); in xfs_dir3_leaf_init()
381 xfs_dir2_data_hdr_t *hdr; /* block header */ in xfs_dir2_block_to_leaf() local
419 hdr = dbp->b_addr; in xfs_dir2_block_to_leaf()
421 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_to_leaf()
423 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_block_to_leaf()
448 (xfs_dir2_data_aoff_t)((char *)blp - (char *)hdr), in xfs_dir2_block_to_leaf()
449 (xfs_dir2_data_aoff_t)((char *)hdr + args->geo->blksize - in xfs_dir2_block_to_leaf()
457 if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC)) in xfs_dir2_block_to_leaf()
458 hdr->magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC); in xfs_dir2_block_to_leaf()
460 hdr->magic = cpu_to_be32(XFS_DIR3_DATA_MAGIC); in xfs_dir2_block_to_leaf()
463 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_block_to_leaf()
612 xfs_dir2_data_hdr_t *hdr; /* data block header */ in xfs_dir2_leaf_addname() local
823 hdr = dbp->b_addr; in xfs_dir2_leaf_addname()
824 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_addname()
839 hdr = dbp->b_addr; in xfs_dir2_leaf_addname()
840 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_addname()
847 ((char *)hdr + be16_to_cpu(bf[0].offset)); in xfs_dir2_leaf_addname()
854 (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr), length, in xfs_dir2_leaf_addname()
865 *tagp = cpu_to_be16((char *)dep - (char *)hdr); in xfs_dir2_leaf_addname()
870 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_leaf_addname()
1068 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_bests()
1069 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC)); in xfs_dir3_leaf_log_bests()
1094 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_ents()
1095 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || in xfs_dir3_leaf_log_ents()
1096 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || in xfs_dir3_leaf_log_ents()
1097 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)); in xfs_dir3_leaf_log_ents()
1117 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_header()
1118 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || in xfs_dir3_leaf_log_header()
1119 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || in xfs_dir3_leaf_log_header()
1120 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)); in xfs_dir3_leaf_log_header()
1123 (uint)((char *)&leaf->hdr - (char *)leaf), in xfs_dir3_leaf_log_header()
1138 ASSERT(leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC) || in xfs_dir3_leaf_log_tail()
1139 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) || in xfs_dir3_leaf_log_tail()
1140 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAFN_MAGIC) || in xfs_dir3_leaf_log_tail()
1141 leaf->hdr.info.magic == cpu_to_be16(XFS_DIR3_LEAFN_MAGIC)); in xfs_dir3_leaf_log_tail()
1346 xfs_dir2_data_hdr_t *hdr; /* data block header */ in xfs_dir2_leaf_removename() local
1375 hdr = dbp->b_addr; in xfs_dir2_leaf_removename()
1377 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_removename()
1385 dep = (xfs_dir2_data_entry_t *)((char *)hdr + in xfs_dir2_leaf_removename()
1396 (xfs_dir2_data_aoff_t)((char *)dep - (char *)hdr), in xfs_dir2_leaf_removename()
1413 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_leaf_removename()
1622 struct xfs_dir2_data_hdr *hdr = dbp->b_addr; in xfs_dir2_leaf_trim_data() local
1623 struct xfs_dir2_data_free *bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leaf_trim_data()
1625 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_leaf_trim_data()
1626 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC)); in xfs_dir2_leaf_trim_data()
1654 struct xfs_dir3_icleaf_hdr *hdr, in xfs_dir3_leaf_size() argument
1660 entries = hdr->count - hdr->stale; in xfs_dir3_leaf_size()
1661 if (hdr->magic == XFS_DIR2_LEAF1_MAGIC || in xfs_dir3_leaf_size()
1662 hdr->magic == XFS_DIR2_LEAFN_MAGIC) in xfs_dir3_leaf_size()