Lines Matching full:dfp
108 xfs_dir2_data_free_t *dfp; /* bestfree entry */ in __xfs_dir3_data_check() local
209 fa = xfs_dir2_data_freefind_verify(hdr, bf, dup, &dfp); in __xfs_dir3_data_check()
212 if (dfp) { in __xfs_dir3_data_check()
213 i = (int)(dfp - bf); in __xfs_dir3_data_check()
491 struct xfs_dir2_data_free *dfp; in xfs_dir2_data_freefind_verify() local
504 for (dfp = &bf[0]; dfp < &bf[XFS_DIR2_DATA_FD_COUNT]; dfp++) { in xfs_dir2_data_freefind_verify()
505 if (!dfp->offset) { in xfs_dir2_data_freefind_verify()
506 if (dfp->length) in xfs_dir2_data_freefind_verify()
513 if (be16_to_cpu(dfp->offset) == off) { in xfs_dir2_data_freefind_verify()
515 if (dfp->length != dup->length) in xfs_dir2_data_freefind_verify()
517 } else if (be16_to_cpu(dfp->offset) > off) { in xfs_dir2_data_freefind_verify()
519 be16_to_cpu(dfp->offset)) in xfs_dir2_data_freefind_verify()
522 if (be16_to_cpu(dfp->offset) + in xfs_dir2_data_freefind_verify()
523 be16_to_cpu(dfp->length) > off) in xfs_dir2_data_freefind_verify()
527 be16_to_cpu(dfp->length) < be16_to_cpu(dup->length)) in xfs_dir2_data_freefind_verify()
529 if (dfp > &bf[0] && in xfs_dir2_data_freefind_verify()
530 be16_to_cpu(dfp[-1].length) < be16_to_cpu(dfp[0].length)) in xfs_dir2_data_freefind_verify()
549 xfs_dir2_data_free_t *dfp; /* bestfree entry */ in xfs_dir2_data_freefind() local
564 for (dfp = &bf[0]; dfp < &bf[XFS_DIR2_DATA_FD_COUNT]; dfp++) { in xfs_dir2_data_freefind()
565 if (!dfp->offset) in xfs_dir2_data_freefind()
567 if (be16_to_cpu(dfp->offset) == off) in xfs_dir2_data_freefind()
568 return dfp; in xfs_dir2_data_freefind()
582 struct xfs_dir2_data_free *dfp, /* bestfree table pointer */ in xfs_dir2_data_freeinsert() argument
599 if (be16_to_cpu(new.length) > be16_to_cpu(dfp[0].length)) { in xfs_dir2_data_freeinsert()
600 dfp[2] = dfp[1]; in xfs_dir2_data_freeinsert()
601 dfp[1] = dfp[0]; in xfs_dir2_data_freeinsert()
602 dfp[0] = new; in xfs_dir2_data_freeinsert()
604 return &dfp[0]; in xfs_dir2_data_freeinsert()
606 if (be16_to_cpu(new.length) > be16_to_cpu(dfp[1].length)) { in xfs_dir2_data_freeinsert()
607 dfp[2] = dfp[1]; in xfs_dir2_data_freeinsert()
608 dfp[1] = new; in xfs_dir2_data_freeinsert()
610 return &dfp[1]; in xfs_dir2_data_freeinsert()
612 if (be16_to_cpu(new.length) > be16_to_cpu(dfp[2].length)) { in xfs_dir2_data_freeinsert()
613 dfp[2] = new; in xfs_dir2_data_freeinsert()
615 return &dfp[2]; in xfs_dir2_data_freeinsert()
627 struct xfs_dir2_data_free *dfp, /* bestfree entry pointer */ in xfs_dir2_data_freeremove() argument
639 if (dfp == &bf[0]) { in xfs_dir2_data_freeremove()
646 else if (dfp == &bf[1]) in xfs_dir2_data_freeremove()
652 ASSERT(dfp == &bf[2]); in xfs_dir2_data_freeremove()
871 xfs_dir2_data_free_t *dfp; /* bestfree pointer */ in xfs_dir2_data_make_free() local
924 dfp = xfs_dir2_data_freefind(hdr, bf, prevdup); in xfs_dir2_data_make_free()
943 * dfp and dfp2 (don't know which is which), and in xfs_dir2_data_make_free()
947 ASSERT(dfp && dfp2); 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()
950 ASSERT(dfp2 == dfp); 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()
961 ASSERT(dfp->length == prevdup->length); in xfs_dir2_data_make_free()
962 ASSERT(!dfp[1].length); in xfs_dir2_data_make_free()
963 ASSERT(!dfp[2].length); in xfs_dir2_data_make_free()
970 dfp = xfs_dir2_data_freefind(hdr, bf, prevdup); in xfs_dir2_data_make_free()
980 if (dfp) { in xfs_dir2_data_make_free()
981 xfs_dir2_data_freeremove(hdr, bf, dfp, needlogp); in xfs_dir2_data_make_free()
996 dfp = xfs_dir2_data_freefind(hdr, bf, postdup); in xfs_dir2_data_make_free()
1008 if (dfp) { in xfs_dir2_data_make_free()
1009 xfs_dir2_data_freeremove(hdr, bf, dfp, needlogp); in xfs_dir2_data_make_free()
1064 struct xfs_dir2_data_free *dfp, in xfs_dir2_data_check_new_free() argument
1067 if (dfp == NULL) in xfs_dir2_data_check_new_free()
1069 if (dfp->length != newdup->length) in xfs_dir2_data_check_new_free()
1071 if (be16_to_cpu(dfp->offset) != (char *)newdup - (char *)hdr) in xfs_dir2_data_check_new_free()
1090 xfs_dir2_data_free_t *dfp; /* bestfree pointer */ in xfs_dir2_data_use_free() local
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()
1123 if (dfp) { in xfs_dir2_data_use_free()
1126 xfs_dir2_data_freeremove(hdr, bf, dfp, in xfs_dir2_data_use_free()
1144 if (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()
1148 fa = xfs_dir2_data_check_new_free(hdr, dfp, newdup); in xfs_dir2_data_use_free()
1156 needscan = dfp == &bf[2]; in xfs_dir2_data_use_free()
1172 if (dfp) { 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()
1184 needscan = dfp == &bf[2]; in xfs_dir2_data_use_free()
1211 if (dfp) { in xfs_dir2_data_use_free()
1214 xfs_dir2_data_freeremove(hdr, bf, dfp, in xfs_dir2_data_use_free()