Lines Matching refs:btp

190 	struct xfs_dir2_block_tail	*btp,  in xfs_dir2_block_need_space()  argument
209 if (btp->stale) { in xfs_dir2_block_need_space()
234 if (be16_to_cpu(dup->length) + (be32_to_cpu(btp->stale) - 1) * in xfs_dir2_block_need_space()
237 } else if ((be32_to_cpu(btp->stale) - 1) * (uint)sizeof(*blp) < len) in xfs_dir2_block_need_space()
303 struct xfs_dir2_block_tail *btp, in xfs_dir2_block_compact() argument
314 fromidx = toidx = be32_to_cpu(btp->count) - 1; in xfs_dir2_block_compact()
330 *lfloglow = toidx + 1 - (be32_to_cpu(btp->stale) - 1); in xfs_dir2_block_compact()
331 *lfloghigh -= be32_to_cpu(btp->stale) - 1; in xfs_dir2_block_compact()
332 be32_add_cpu(&btp->count, -(be32_to_cpu(btp->stale) - 1)); in xfs_dir2_block_compact()
335 (xfs_dir2_data_aoff_t)((be32_to_cpu(btp->stale) - 1) * sizeof(*blp)), in xfs_dir2_block_compact()
337 btp->stale = cpu_to_be32(1); in xfs_dir2_block_compact()
356 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_addname() local
393 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_addname()
394 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_addname()
400 xfs_dir2_block_need_space(dp, hdr, btp, blp, &tagp, &dup, in xfs_dir2_block_addname()
436 xfs_dir2_block_compact(args, bp, hdr, btp, blp, &needlog, in xfs_dir2_block_addname()
439 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_addname()
440 } else if (btp->stale) { in xfs_dir2_block_addname()
445 lfloglow = be32_to_cpu(btp->count); in xfs_dir2_block_addname()
452 for (low = 0, high = be32_to_cpu(btp->count) - 1; low <= high; ) { in xfs_dir2_block_addname()
467 if (!btp->stale) { in xfs_dir2_block_addname()
484 be32_add_cpu(&btp->count, 1); in xfs_dir2_block_addname()
516 highstale < be32_to_cpu(btp->count) && in xfs_dir2_block_addname()
526 (highstale == be32_to_cpu(btp->count) || in xfs_dir2_block_addname()
538 ASSERT(highstale < be32_to_cpu(btp->count)); in xfs_dir2_block_addname()
546 be32_add_cpu(&btp->stale, -1); in xfs_dir2_block_addname()
601 xfs_dir2_block_tail_t *btp; in xfs_dir2_block_log_leaf() local
603 btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); in xfs_dir2_block_log_leaf()
604 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_log_leaf()
618 xfs_dir2_block_tail_t *btp; in xfs_dir2_block_log_tail() local
620 btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); in xfs_dir2_block_log_tail()
621 xfs_trans_log_buf(tp, bp, (uint)((char *)btp - (char *)hdr), in xfs_dir2_block_log_tail()
622 (uint)((char *)(btp + 1) - (char *)hdr - 1)); in xfs_dir2_block_log_tail()
636 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_lookup() local
653 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup()
654 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup()
684 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_lookup_int() local
704 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup_int()
705 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup_int()
710 for (low = 0, high = be32_to_cpu(btp->count) - 1; ; ) { in xfs_dir2_block_lookup_int()
756 } while (++mid < be32_to_cpu(btp->count) && in xfs_dir2_block_lookup_int()
784 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_removename() local
807 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_removename()
808 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_removename()
826 be32_add_cpu(&btp->stale, 1); in xfs_dir2_block_removename()
865 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_replace() local
882 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_replace()
883 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_replace()
929 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_leaf_to_block() local
1024 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_leaf_to_block()
1025 btp->count = cpu_to_be32(leafhdr.count - leafhdr.stale); in xfs_dir2_leaf_to_block()
1026 btp->stale = 0; in xfs_dir2_leaf_to_block()
1031 lep = xfs_dir2_block_leaf_p(btp); in xfs_dir2_leaf_to_block()
1038 ASSERT(to == be32_to_cpu(btp->count)); in xfs_dir2_leaf_to_block()
1039 xfs_dir2_block_log_leaf(tp, dbp, 0, be32_to_cpu(btp->count) - 1); in xfs_dir2_leaf_to_block()
1080 xfs_dir2_block_tail_t *btp; /* block tail pointer */ in xfs_dir2_sf_to_block() local
1138 i = (uint)sizeof(*btp) + in xfs_dir2_sf_to_block()
1154 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_sf_to_block()
1155 btp->count = cpu_to_be32(sfp->count + 2); /* ., .. */ in xfs_dir2_sf_to_block()
1156 btp->stale = 0; in xfs_dir2_sf_to_block()
1157 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_sf_to_block()
1262 xfs_sort(blp, be32_to_cpu(btp->count), sizeof(*blp), xfs_dir2_block_sort); in xfs_dir2_sf_to_block()
1268 xfs_dir2_block_log_leaf(tp, bp, 0, be32_to_cpu(btp->count) - 1); in xfs_dir2_sf_to_block()