Lines Matching full:hdr

24 		struct xfs_dir2_data_hdr *hdr, struct xfs_dir2_data_free *bf,
31 struct xfs_dir2_data_hdr *hdr) in xfs_dir2_data_bestfree_p() argument
34 return ((struct xfs_dir3_data_hdr *)hdr)->best_free; in xfs_dir2_data_bestfree_p()
35 return hdr->bestfree; in xfs_dir2_data_bestfree_p()
107 xfs_dir2_data_hdr_t *hdr; /* data block header */ in __xfs_dir3_data_check() local
127 hdr = bp->b_addr; in __xfs_dir3_data_check()
130 switch (hdr->magic) { in __xfs_dir3_data_check()
133 btp = xfs_dir2_block_tail_p(geo, hdr); in __xfs_dir3_data_check()
146 end = xfs_dir3_data_end_offset(geo, hdr); in __xfs_dir3_data_check()
153 bf = xfs_dir2_data_bestfree_p(mp, hdr); in __xfs_dir3_data_check()
209 fa = xfs_dir2_data_freefind_verify(hdr, bf, dup, &dfp); in __xfs_dir3_data_check()
253 if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in __xfs_dir3_data_check()
254 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)) { in __xfs_dir3_data_check()
257 ((char *)dep - (char *)hdr)); in __xfs_dir3_data_check()
276 if (hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in __xfs_dir3_data_check()
277 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)) { in __xfs_dir3_data_check()
342 struct xfs_dir2_data_hdr *hdr = bp->b_addr; in xfs_dir3_data_reada_verify() local
344 switch (hdr->magic) { in xfs_dir3_data_reada_verify()
429 if (hdr3->hdr.magic != cpu_to_be32(XFS_DIR3_DATA_MAGIC)) in xfs_dir3_data_header_check()
432 if (be64_to_cpu(hdr3->hdr.owner) != owner) in xfs_dir3_data_header_check()
486 struct xfs_dir2_data_hdr *hdr, in xfs_dir2_data_freefind_verify() argument
497 off = (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr); in xfs_dir2_data_freefind_verify()
535 *bf_ent = xfs_dir2_data_freefind(hdr, bf, dup); in xfs_dir2_data_freefind_verify()
545 struct xfs_dir2_data_hdr *hdr, /* data block header */ in xfs_dir2_data_freefind() argument
552 off = (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr); in xfs_dir2_data_freefind()
581 struct xfs_dir2_data_hdr *hdr, /* data block pointer */ in xfs_dir2_data_freeinsert() argument
588 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_data_freeinsert()
589 hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in xfs_dir2_data_freeinsert()
590 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || in xfs_dir2_data_freeinsert()
591 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); in xfs_dir2_data_freeinsert()
594 new.offset = cpu_to_be16((char *)dup - (char *)hdr); in xfs_dir2_data_freeinsert()
625 struct xfs_dir2_data_hdr *hdr, /* data block header */ in xfs_dir2_data_freeremove() argument
631 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_data_freeremove()
632 hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in xfs_dir2_data_freeremove()
633 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || in xfs_dir2_data_freeremove()
634 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); in xfs_dir2_data_freeremove()
667 struct xfs_dir2_data_hdr *hdr, in xfs_dir2_data_freescan() argument
671 struct xfs_dir2_data_free *bf = xfs_dir2_data_bestfree_p(mp, hdr); in xfs_dir2_data_freescan()
672 void *addr = hdr; in xfs_dir2_data_freescan()
676 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_data_freescan()
677 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || in xfs_dir2_data_freescan()
678 hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in xfs_dir2_data_freescan()
679 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); in xfs_dir2_data_freescan()
698 xfs_dir2_data_freeinsert(hdr, bf, dup, loghead); in xfs_dir2_data_freescan()
727 struct xfs_dir2_data_hdr *hdr; in xfs_dir3_data_init() local
746 hdr = bp->b_addr; in xfs_dir3_data_init()
757 hdr->magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC); in xfs_dir3_data_init()
759 bf = xfs_dir2_data_bestfree_p(mp, hdr); in xfs_dir3_data_init()
773 *xfs_dir2_data_unused_tag_p(dup) = cpu_to_be16((char *)dup - (char *)hdr); in xfs_dir3_data_init()
794 struct xfs_dir2_data_hdr *hdr = bp->b_addr; in xfs_dir2_data_log_entry() local
796 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_data_log_entry()
797 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || in xfs_dir2_data_log_entry()
798 hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in xfs_dir2_data_log_entry()
799 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); in xfs_dir2_data_log_entry()
801 xfs_trans_log_buf(args->trans, bp, (uint)((char *)dep - (char *)hdr), in xfs_dir2_data_log_entry()
803 (char *)hdr - 1)); in xfs_dir2_data_log_entry()
815 struct xfs_dir2_data_hdr *hdr = bp->b_addr; in xfs_dir2_data_log_header() local
817 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_data_log_header()
818 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || in xfs_dir2_data_log_header()
819 hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in xfs_dir2_data_log_header()
820 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); in xfs_dir2_data_log_header()
835 xfs_dir2_data_hdr_t *hdr = bp->b_addr; in xfs_dir2_data_log_unused() local
837 ASSERT(hdr->magic == cpu_to_be32(XFS_DIR2_DATA_MAGIC) || in xfs_dir2_data_log_unused()
838 hdr->magic == cpu_to_be32(XFS_DIR3_DATA_MAGIC) || in xfs_dir2_data_log_unused()
839 hdr->magic == cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) || in xfs_dir2_data_log_unused()
840 hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); in xfs_dir2_data_log_unused()
845 xfs_trans_log_buf(args->trans, bp, (uint)((char *)dup - (char *)hdr), in xfs_dir2_data_log_unused()
847 1 - (char *)hdr)); in xfs_dir2_data_log_unused()
852 (uint)((char *)xfs_dir2_data_unused_tag_p(dup) - (char *)hdr), in xfs_dir2_data_log_unused()
853 (uint)((char *)xfs_dir2_data_unused_tag_p(dup) - (char *)hdr + in xfs_dir2_data_log_unused()
870 xfs_dir2_data_hdr_t *hdr; /* data block pointer */ in xfs_dir2_data_make_free() local
879 hdr = bp->b_addr; in xfs_dir2_data_make_free()
884 end = xfs_dir3_data_end_offset(args->geo, hdr); in xfs_dir2_data_make_free()
894 tagp = (__be16 *)((char *)hdr + offset) - 1; in xfs_dir2_data_make_free()
895 prevdup = (xfs_dir2_data_unused_t *)((char *)hdr + be16_to_cpu(*tagp)); in xfs_dir2_data_make_free()
906 (xfs_dir2_data_unused_t *)((char *)hdr + offset + len); in xfs_dir2_data_make_free()
917 bf = xfs_dir2_data_bestfree_p(args->dp->i_mount, hdr); in xfs_dir2_data_make_free()
924 dfp = xfs_dir2_data_freefind(hdr, bf, prevdup); in xfs_dir2_data_make_free()
925 dfp2 = xfs_dir2_data_freefind(hdr, bf, postdup); in xfs_dir2_data_make_free()
938 cpu_to_be16((char *)prevdup - (char *)hdr); in xfs_dir2_data_make_free()
953 xfs_dir2_data_freeremove(hdr, bf, dfp2, needlogp); in xfs_dir2_data_make_free()
954 xfs_dir2_data_freeremove(hdr, bf, dfp, needlogp); in xfs_dir2_data_make_free()
958 dfp = xfs_dir2_data_freeinsert(hdr, bf, prevdup, in xfs_dir2_data_make_free()
970 dfp = xfs_dir2_data_freefind(hdr, bf, prevdup); in xfs_dir2_data_make_free()
973 cpu_to_be16((char *)prevdup - (char *)hdr); in xfs_dir2_data_make_free()
981 xfs_dir2_data_freeremove(hdr, bf, dfp, needlogp); in xfs_dir2_data_make_free()
982 xfs_dir2_data_freeinsert(hdr, bf, prevdup, needlogp); in xfs_dir2_data_make_free()
996 dfp = xfs_dir2_data_freefind(hdr, bf, postdup); in xfs_dir2_data_make_free()
997 newdup = (xfs_dir2_data_unused_t *)((char *)hdr + offset); in xfs_dir2_data_make_free()
1001 cpu_to_be16((char *)newdup - (char *)hdr); in xfs_dir2_data_make_free()
1009 xfs_dir2_data_freeremove(hdr, bf, dfp, needlogp); in xfs_dir2_data_make_free()
1010 xfs_dir2_data_freeinsert(hdr, bf, newdup, needlogp); in xfs_dir2_data_make_free()
1024 newdup = (xfs_dir2_data_unused_t *)((char *)hdr + offset); in xfs_dir2_data_make_free()
1028 cpu_to_be16((char *)newdup - (char *)hdr); in xfs_dir2_data_make_free()
1030 xfs_dir2_data_freeinsert(hdr, bf, newdup, needlogp); in xfs_dir2_data_make_free()
1038 struct xfs_dir2_data_hdr *hdr, in xfs_dir2_data_check_free() argument
1043 if (hdr->magic != cpu_to_be32(XFS_DIR2_DATA_MAGIC) && in xfs_dir2_data_check_free()
1044 hdr->magic != cpu_to_be32(XFS_DIR3_DATA_MAGIC) && in xfs_dir2_data_check_free()
1045 hdr->magic != cpu_to_be32(XFS_DIR2_BLOCK_MAGIC) && in xfs_dir2_data_check_free()
1046 hdr->magic != cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)) in xfs_dir2_data_check_free()
1050 if (offset < (char *)dup - (char *)hdr) in xfs_dir2_data_check_free()
1052 if (offset + len > (char *)dup + be16_to_cpu(dup->length) - (char *)hdr) in xfs_dir2_data_check_free()
1054 if ((char *)dup - (char *)hdr != in xfs_dir2_data_check_free()
1063 struct xfs_dir2_data_hdr *hdr, in xfs_dir2_data_check_new_free() argument
1071 if (be16_to_cpu(dfp->offset) != (char *)newdup - (char *)hdr) in xfs_dir2_data_check_new_free()
1089 xfs_dir2_data_hdr_t *hdr; /* data block header */ in xfs_dir2_data_use_free() local
1100 hdr = bp->b_addr; in xfs_dir2_data_use_free()
1101 fa = xfs_dir2_data_check_free(hdr, dup, offset, len); in xfs_dir2_data_use_free()
1108 bf = xfs_dir2_data_bestfree_p(args->dp->i_mount, hdr); in xfs_dir2_data_use_free()
1109 dfp = xfs_dir2_data_freefind(hdr, bf, dup); in xfs_dir2_data_use_free()
1114 matchfront = (char *)dup - (char *)hdr == offset; in xfs_dir2_data_use_free()
1115 matchback = (char *)dup + oldlen - (char *)hdr == offset + len; in xfs_dir2_data_use_free()
1126 xfs_dir2_data_freeremove(hdr, bf, dfp, in xfs_dir2_data_use_free()
1135 newdup = (xfs_dir2_data_unused_t *)((char *)hdr + offset + len); in xfs_dir2_data_use_free()
1139 cpu_to_be16((char *)newdup - (char *)hdr); in xfs_dir2_data_use_free()
1145 xfs_dir2_data_freeremove(hdr, bf, dfp, needlogp); in xfs_dir2_data_use_free()
1146 dfp = xfs_dir2_data_freeinsert(hdr, bf, newdup, in xfs_dir2_data_use_free()
1148 fa = xfs_dir2_data_check_new_free(hdr, dfp, newdup); in xfs_dir2_data_use_free()
1165 newdup->length = cpu_to_be16(((char *)hdr + offset) - (char *)newdup); in xfs_dir2_data_use_free()
1167 cpu_to_be16((char *)newdup - (char *)hdr); in xfs_dir2_data_use_free()
1173 xfs_dir2_data_freeremove(hdr, bf, dfp, needlogp); in xfs_dir2_data_use_free()
1174 dfp = xfs_dir2_data_freeinsert(hdr, bf, newdup, in xfs_dir2_data_use_free()
1176 fa = xfs_dir2_data_check_new_free(hdr, dfp, newdup); in xfs_dir2_data_use_free()
1193 newdup->length = cpu_to_be16(((char *)hdr + offset) - (char *)newdup); in xfs_dir2_data_use_free()
1195 cpu_to_be16((char *)newdup - (char *)hdr); in xfs_dir2_data_use_free()
1197 newdup2 = (xfs_dir2_data_unused_t *)((char *)hdr + offset + len); in xfs_dir2_data_use_free()
1201 cpu_to_be16((char *)newdup2 - (char *)hdr); in xfs_dir2_data_use_free()
1214 xfs_dir2_data_freeremove(hdr, bf, dfp, in xfs_dir2_data_use_free()
1216 xfs_dir2_data_freeinsert(hdr, bf, newdup, in xfs_dir2_data_use_free()
1218 xfs_dir2_data_freeinsert(hdr, bf, newdup2, in xfs_dir2_data_use_free()
1227 hdr, sizeof(*hdr), __FILE__, __LINE__, fa); in xfs_dir2_data_use_free()
1236 struct xfs_dir2_data_hdr *hdr) in xfs_dir3_data_end_offset() argument
1240 switch (hdr->magic) { in xfs_dir3_data_end_offset()
1243 p = xfs_dir2_block_leaf_p(xfs_dir2_block_tail_p(geo, hdr)); in xfs_dir3_data_end_offset()
1244 return p - (void *)hdr; in xfs_dir3_data_end_offset()