Lines Matching refs:btp

171 	struct xfs_dir2_block_tail	*btp,  in xfs_dir2_block_need_space()  argument
190 if (btp->stale) { in xfs_dir2_block_need_space()
215 if (be16_to_cpu(dup->length) + (be32_to_cpu(btp->stale) - 1) * in xfs_dir2_block_need_space()
218 } else if ((be32_to_cpu(btp->stale) - 1) * (uint)sizeof(*blp) < len) in xfs_dir2_block_need_space()
284 struct xfs_dir2_block_tail *btp, in xfs_dir2_block_compact() argument
295 fromidx = toidx = be32_to_cpu(btp->count) - 1; in xfs_dir2_block_compact()
311 *lfloglow = toidx + 1 - (be32_to_cpu(btp->stale) - 1); in xfs_dir2_block_compact()
312 *lfloghigh -= be32_to_cpu(btp->stale) - 1; in xfs_dir2_block_compact()
313 be32_add_cpu(&btp->count, -(be32_to_cpu(btp->stale) - 1)); in xfs_dir2_block_compact()
316 (xfs_dir2_data_aoff_t)((be32_to_cpu(btp->stale) - 1) * sizeof(*blp)), in xfs_dir2_block_compact()
318 btp->stale = cpu_to_be32(1); in xfs_dir2_block_compact()
337 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_addname() local
374 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_addname()
375 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_addname()
381 xfs_dir2_block_need_space(dp, hdr, btp, blp, &tagp, &dup, in xfs_dir2_block_addname()
417 xfs_dir2_block_compact(args, bp, hdr, btp, blp, &needlog, in xfs_dir2_block_addname()
420 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_addname()
421 } else if (btp->stale) { in xfs_dir2_block_addname()
426 lfloglow = be32_to_cpu(btp->count); in xfs_dir2_block_addname()
433 for (low = 0, high = be32_to_cpu(btp->count) - 1; low <= high; ) { in xfs_dir2_block_addname()
448 if (!btp->stale) { in xfs_dir2_block_addname()
461 be32_add_cpu(&btp->count, 1); in xfs_dir2_block_addname()
493 highstale < be32_to_cpu(btp->count) && in xfs_dir2_block_addname()
503 (highstale == be32_to_cpu(btp->count) || in xfs_dir2_block_addname()
515 ASSERT(highstale < be32_to_cpu(btp->count)); in xfs_dir2_block_addname()
523 be32_add_cpu(&btp->stale, -1); in xfs_dir2_block_addname()
576 xfs_dir2_block_tail_t *btp; in xfs_dir2_block_log_leaf() local
578 btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); in xfs_dir2_block_log_leaf()
579 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_log_leaf()
593 xfs_dir2_block_tail_t *btp; in xfs_dir2_block_log_tail() local
595 btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); in xfs_dir2_block_log_tail()
596 xfs_trans_log_buf(tp, bp, (uint)((char *)btp - (char *)hdr), in xfs_dir2_block_log_tail()
597 (uint)((char *)(btp + 1) - (char *)hdr - 1)); in xfs_dir2_block_log_tail()
611 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_lookup() local
628 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup()
629 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup()
659 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_lookup_int() local
681 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup_int()
682 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup_int()
687 for (low = 0, high = be32_to_cpu(btp->count) - 1; ; ) { in xfs_dir2_block_lookup_int()
733 } while (++mid < be32_to_cpu(btp->count) && in xfs_dir2_block_lookup_int()
761 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_removename() local
784 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_removename()
785 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_removename()
802 be32_add_cpu(&btp->stale, 1); in xfs_dir2_block_removename()
841 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_block_replace() local
858 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_replace()
859 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_replace()
905 xfs_dir2_block_tail_t *btp; /* block tail */ in xfs_dir2_leaf_to_block() local
1000 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_leaf_to_block()
1001 btp->count = cpu_to_be32(leafhdr.count - leafhdr.stale); in xfs_dir2_leaf_to_block()
1002 btp->stale = 0; in xfs_dir2_leaf_to_block()
1007 lep = xfs_dir2_block_leaf_p(btp); in xfs_dir2_leaf_to_block()
1013 ASSERT(to == be32_to_cpu(btp->count)); in xfs_dir2_leaf_to_block()
1014 xfs_dir2_block_log_leaf(tp, dbp, 0, be32_to_cpu(btp->count) - 1); in xfs_dir2_leaf_to_block()
1050 xfs_dir2_block_tail_t *btp; /* block tail pointer */ in xfs_dir2_sf_to_block() local
1126 i = (uint)sizeof(*btp) + in xfs_dir2_sf_to_block()
1140 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_sf_to_block()
1141 btp->count = cpu_to_be32(sfp->count + 2); /* ., .. */ in xfs_dir2_sf_to_block()
1142 btp->stale = 0; in xfs_dir2_sf_to_block()
1143 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_sf_to_block()
1244 xfs_sort(blp, be32_to_cpu(btp->count), sizeof(*blp), xfs_dir2_block_sort); in xfs_dir2_sf_to_block()
1250 xfs_dir2_block_log_leaf(tp, bp, 0, be32_to_cpu(btp->count) - 1); in xfs_dir2_sf_to_block()