Lines Matching refs:bf
24 struct xfs_dir2_data_hdr *hdr, struct xfs_dir2_data_free *bf,
104 xfs_dir2_data_free_t *bf; /* bestfree table */ in __xfs_dir3_data_check() local
153 bf = xfs_dir2_data_bestfree_p(mp, hdr); in __xfs_dir3_data_check()
155 if (!bf[0].length) { in __xfs_dir3_data_check()
156 if (bf[0].offset) in __xfs_dir3_data_check()
160 if (!bf[1].length) { in __xfs_dir3_data_check()
161 if (bf[1].offset) in __xfs_dir3_data_check()
165 if (!bf[2].length) { in __xfs_dir3_data_check()
166 if (bf[2].offset) in __xfs_dir3_data_check()
171 if (be16_to_cpu(bf[0].length) < be16_to_cpu(bf[1].length)) in __xfs_dir3_data_check()
173 if (be16_to_cpu(bf[1].length) < be16_to_cpu(bf[2].length)) in __xfs_dir3_data_check()
209 fa = xfs_dir2_data_freefind_verify(hdr, bf, dup, &dfp); in __xfs_dir3_data_check()
213 i = (int)(dfp - bf); in __xfs_dir3_data_check()
219 be16_to_cpu(bf[2].length)) in __xfs_dir3_data_check()
487 struct xfs_dir2_data_free *bf, in xfs_dir2_data_freefind_verify() argument
504 for (dfp = &bf[0]; dfp < &bf[XFS_DIR2_DATA_FD_COUNT]; dfp++) { in xfs_dir2_data_freefind_verify()
529 if (dfp > &bf[0] && in xfs_dir2_data_freefind_verify()
535 *bf_ent = xfs_dir2_data_freefind(hdr, bf, dup); in xfs_dir2_data_freefind_verify()
546 struct xfs_dir2_data_free *bf, /* bestfree table pointer */ in xfs_dir2_data_freefind() argument
559 be16_to_cpu(bf[XFS_DIR2_DATA_FD_COUNT - 1].length)) in xfs_dir2_data_freefind()
564 for (dfp = &bf[0]; dfp < &bf[XFS_DIR2_DATA_FD_COUNT]; dfp++) { in xfs_dir2_data_freefind()
626 struct xfs_dir2_data_free *bf, /* bestfree table pointer */ in xfs_dir2_data_freeremove() argument
639 if (dfp == &bf[0]) { in xfs_dir2_data_freeremove()
640 bf[0] = bf[1]; in xfs_dir2_data_freeremove()
641 bf[1] = bf[2]; in xfs_dir2_data_freeremove()
646 else if (dfp == &bf[1]) in xfs_dir2_data_freeremove()
647 bf[1] = bf[2]; in xfs_dir2_data_freeremove()
652 ASSERT(dfp == &bf[2]); in xfs_dir2_data_freeremove()
656 bf[2].length = 0; in xfs_dir2_data_freeremove()
657 bf[2].offset = 0; in xfs_dir2_data_freeremove()
671 struct xfs_dir2_data_free *bf = xfs_dir2_data_bestfree_p(mp, hdr); in xfs_dir2_data_freescan() local
684 memset(bf, 0, sizeof(*bf) * XFS_DIR2_DATA_FD_COUNT); in xfs_dir2_data_freescan()
698 xfs_dir2_data_freeinsert(hdr, bf, dup, loghead); in xfs_dir2_data_freescan()
729 struct xfs_dir2_data_free *bf; in xfs_dir3_data_init() local
759 bf = xfs_dir2_data_bestfree_p(mp, hdr); in xfs_dir3_data_init()
760 bf[0].offset = cpu_to_be16(geo->data_entry_offset); in xfs_dir3_data_init()
761 bf[0].length = cpu_to_be16(geo->blksize - geo->data_entry_offset); in xfs_dir3_data_init()
763 bf[i].length = 0; in xfs_dir3_data_init()
764 bf[i].offset = 0; in xfs_dir3_data_init()
772 dup->length = bf[0].length; in xfs_dir3_data_init()
877 struct xfs_dir2_data_free *bf; in xfs_dir2_data_make_free() local
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()
932 needscan = (bf[2].length != 0); in xfs_dir2_data_make_free()
948 if (dfp == &bf[1]) { in xfs_dir2_data_make_free()
949 dfp = &bf[0]; in xfs_dir2_data_make_free()
951 dfp2 = &bf[1]; 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()
960 ASSERT(dfp == &bf[0]); in xfs_dir2_data_make_free()
970 dfp = xfs_dir2_data_freefind(hdr, bf, prevdup); 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()
989 be16_to_cpu(bf[2].length); in xfs_dir2_data_make_free()
996 dfp = xfs_dir2_data_freefind(hdr, bf, postdup); 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()
1017 be16_to_cpu(bf[2].length); in xfs_dir2_data_make_free()
1030 xfs_dir2_data_freeinsert(hdr, bf, newdup, needlogp); in xfs_dir2_data_make_free()
1093 struct xfs_dir2_data_free *bf; in xfs_dir2_data_use_free() local
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()
1110 ASSERT(dfp || oldlen <= be16_to_cpu(bf[2].length)); in xfs_dir2_data_use_free()
1124 needscan = (bf[2].offset != 0); in xfs_dir2_data_use_free()
1126 xfs_dir2_data_freeremove(hdr, bf, dfp, 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()
1156 needscan = dfp == &bf[2]; 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()
1184 needscan = dfp == &bf[2]; in xfs_dir2_data_use_free()
1212 needscan = (bf[2].length != 0); 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()