Lines Matching refs:btp

175 	struct xfs_dir2_block_tail	*btp,  in xfs_dir2_block_need_space()  argument
194 if (btp->stale) { in xfs_dir2_block_need_space()
219 if (be16_to_cpu(dup->length) + (be32_to_cpu(btp->stale) - 1) * in xfs_dir2_block_need_space()
222 } else if ((be32_to_cpu(btp->stale) - 1) * (uint)sizeof(*blp) < len) in xfs_dir2_block_need_space()
288 struct xfs_dir2_block_tail *btp, in xfs_dir2_block_compact() argument
299 fromidx = toidx = be32_to_cpu(btp->count) - 1; in xfs_dir2_block_compact()
315 *lfloglow = toidx + 1 - (be32_to_cpu(btp->stale) - 1); in xfs_dir2_block_compact()
316 *lfloghigh -= be32_to_cpu(btp->stale) - 1; in xfs_dir2_block_compact()
317 be32_add_cpu(&btp->count, -(be32_to_cpu(btp->stale) - 1)); in xfs_dir2_block_compact()
320 (xfs_dir2_data_aoff_t)((be32_to_cpu(btp->stale) - 1) * sizeof(*blp)), in xfs_dir2_block_compact()
322 btp->stale = cpu_to_be32(1); in xfs_dir2_block_compact()
341 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_addname() local
378 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_addname()
379 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_addname()
385 xfs_dir2_block_need_space(dp, hdr, btp, blp, &tagp, &dup, in xfs_dir2_block_addname()
421 xfs_dir2_block_compact(args, bp, hdr, btp, blp, &needlog, in xfs_dir2_block_addname()
424 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_addname()
425 } else if (btp->stale) { in xfs_dir2_block_addname()
430 lfloglow = be32_to_cpu(btp->count); in xfs_dir2_block_addname()
437 for (low = 0, high = be32_to_cpu(btp->count) - 1; low <= high; ) { in xfs_dir2_block_addname()
452 if (!btp->stale) { in xfs_dir2_block_addname()
465 be32_add_cpu(&btp->count, 1); in xfs_dir2_block_addname()
497 highstale < be32_to_cpu(btp->count) && in xfs_dir2_block_addname()
507 (highstale == be32_to_cpu(btp->count) || in xfs_dir2_block_addname()
519 ASSERT(highstale < be32_to_cpu(btp->count)); in xfs_dir2_block_addname()
527 be32_add_cpu(&btp->stale, -1); in xfs_dir2_block_addname()
580 xfs_dir2_block_tail_t *btp; in xfs_dir2_block_log_leaf() local
582 btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); in xfs_dir2_block_log_leaf()
583 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_log_leaf()
597 xfs_dir2_block_tail_t *btp; in xfs_dir2_block_log_tail() local
599 btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); in xfs_dir2_block_log_tail()
600 xfs_trans_log_buf(tp, bp, (uint)((char *)btp - (char *)hdr), in xfs_dir2_block_log_tail()
601 (uint)((char *)(btp + 1) - (char *)hdr - 1)); in xfs_dir2_block_log_tail()
615 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_lookup() local
632 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup()
633 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup()
663 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_lookup_int() local
685 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup_int()
686 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup_int()
691 for (low = 0, high = be32_to_cpu(btp->count) - 1; ; ) { in xfs_dir2_block_lookup_int()
737 } while (++mid < be32_to_cpu(btp->count) && in xfs_dir2_block_lookup_int()
765 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_removename() local
788 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_removename()
789 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_removename()
806 be32_add_cpu(&btp->stale, 1); in xfs_dir2_block_removename()
845 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_replace() local
862 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_replace()
863 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_replace()
909 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_leaf_to_block() local
1004 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_leaf_to_block()
1005 btp->count = cpu_to_be32(leafhdr.count - leafhdr.stale); in xfs_dir2_leaf_to_block()
1006 btp->stale = 0; in xfs_dir2_leaf_to_block()
1011 lep = xfs_dir2_block_leaf_p(btp); in xfs_dir2_leaf_to_block()
1017 ASSERT(to == be32_to_cpu(btp->count)); in xfs_dir2_leaf_to_block()
1018 xfs_dir2_block_log_leaf(tp, dbp, 0, be32_to_cpu(btp->count) - 1); in xfs_dir2_leaf_to_block()
1054 xfs_dir2_block_tail_t *btp; /* block tail pointer */ in xfs_dir2_sf_to_block() local
1130 i = (uint)sizeof(*btp) + in xfs_dir2_sf_to_block()
1144 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_sf_to_block()
1145 btp->count = cpu_to_be32(sfp->count + 2); /* ., .. */ in xfs_dir2_sf_to_block()
1146 btp->stale = 0; in xfs_dir2_sf_to_block()
1147 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_sf_to_block()
1248 xfs_sort(blp, be32_to_cpu(btp->count), sizeof(*blp), xfs_dir2_block_sort); in xfs_dir2_sf_to_block()
1254 xfs_dir2_block_log_leaf(tp, bp, 0, be32_to_cpu(btp->count) - 1); in xfs_dir2_sf_to_block()