Lines Matching refs:blp
191 struct xfs_dir2_leaf_entry *blp, in xfs_dir2_block_need_space() argument
224 tagp = (__be16 *)blp - 1; in xfs_dir2_block_need_space()
235 (uint)sizeof(*blp) < len) 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()
240 dup = (xfs_dir2_data_unused_t *)blp; in xfs_dir2_block_need_space()
248 tagp = (__be16 *)blp - 1; in xfs_dir2_block_need_space()
276 if (be16_to_cpu(dup->length) < len + (uint)sizeof(*blp)) { in xfs_dir2_block_need_space()
304 struct xfs_dir2_leaf_entry *blp, in xfs_dir2_block_compact() argument
317 if (blp[fromidx].address == cpu_to_be32(XFS_DIR2_NULL_DATAPTR)) { in xfs_dir2_block_compact()
327 blp[toidx] = blp[fromidx]; in xfs_dir2_block_compact()
334 (xfs_dir2_data_aoff_t)((char *)blp - (char *)hdr), in xfs_dir2_block_compact()
335 (xfs_dir2_data_aoff_t)((be32_to_cpu(btp->stale) - 1) * sizeof(*blp)), in xfs_dir2_block_compact()
354 xfs_dir2_leaf_entry_t *blp; /* block leaf entries */ in xfs_dir2_block_addname() local
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()
454 if ((hash = be32_to_cpu(blp[mid].hashval)) == args->hashval) in xfs_dir2_block_addname()
461 while (mid >= 0 && be32_to_cpu(blp[mid].hashval) >= args->hashval) { in xfs_dir2_block_addname()
474 be16_to_cpu(enddup->length) - sizeof(*blp)); in xfs_dir2_block_addname()
476 (xfs_dir2_data_aoff_t)sizeof(*blp), &needlog, in xfs_dir2_block_addname()
498 blp--; in xfs_dir2_block_addname()
501 memmove(blp, &blp[1], mid * sizeof(*blp)); in xfs_dir2_block_addname()
511 blp[lowstale].address != in xfs_dir2_block_addname()
517 blp[highstale].address != in xfs_dir2_block_addname()
529 memmove(&blp[lowstale], &blp[lowstale + 1], in xfs_dir2_block_addname()
530 (mid - lowstale) * sizeof(*blp)); in xfs_dir2_block_addname()
541 memmove(&blp[mid + 1], &blp[mid], in xfs_dir2_block_addname()
542 (highstale - mid) * sizeof(*blp)); in xfs_dir2_block_addname()
555 blp[mid].hashval = cpu_to_be32(args->hashval); in xfs_dir2_block_addname()
556 blp[mid].address = cpu_to_be32(xfs_dir2_byte_to_dataptr( in xfs_dir2_block_addname()
600 xfs_dir2_leaf_entry_t *blp; in xfs_dir2_block_log_leaf() local
604 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_log_leaf()
605 xfs_trans_log_buf(tp, bp, (uint)((char *)&blp[first] - (char *)hdr), in xfs_dir2_block_log_leaf()
606 (uint)((char *)&blp[last + 1] - (char *)hdr - 1)); in xfs_dir2_block_log_leaf()
634 xfs_dir2_leaf_entry_t *blp; /* block leaf entries */ in xfs_dir2_block_lookup() local
654 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup()
660 be32_to_cpu(blp[ent].address))); in xfs_dir2_block_lookup()
682 xfs_dir2_leaf_entry_t *blp; /* block leaf entries */ in xfs_dir2_block_lookup_int() local
705 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_lookup_int()
713 if ((hash = be32_to_cpu(blp[mid].hashval)) == args->hashval) in xfs_dir2_block_lookup_int()
728 while (mid > 0 && be32_to_cpu(blp[mid - 1].hashval) == args->hashval) { in xfs_dir2_block_lookup_int()
736 if ((addr = be32_to_cpu(blp[mid].address)) == XFS_DIR2_NULL_DATAPTR) in xfs_dir2_block_lookup_int()
757 be32_to_cpu(blp[mid].hashval) == hash); in xfs_dir2_block_lookup_int()
782 xfs_dir2_leaf_entry_t *blp; /* block leaf pointer */ in xfs_dir2_block_removename() local
808 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_removename()
814 be32_to_cpu(blp[ent].address))); in xfs_dir2_block_removename()
831 blp[ent].address = cpu_to_be32(XFS_DIR2_NULL_DATAPTR); in xfs_dir2_block_removename()
863 xfs_dir2_leaf_entry_t *blp; /* block leaf entries */ in xfs_dir2_block_replace() local
883 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_block_replace()
889 be32_to_cpu(blp[ent].address))); in xfs_dir2_block_replace()
1078 xfs_dir2_leaf_entry_t *blp; /* block leaf entries */ in xfs_dir2_sf_to_block() local
1157 blp = xfs_dir2_block_leaf_p(btp); in xfs_dir2_sf_to_block()
1158 endoffset = (uint)((char *)blp - (char *)hdr); in xfs_dir2_sf_to_block()
1179 blp[0].hashval = cpu_to_be32(xfs_dir_hash_dot); in xfs_dir2_sf_to_block()
1180 blp[0].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(offset)); in xfs_dir2_sf_to_block()
1194 blp[1].hashval = cpu_to_be32(xfs_dir_hash_dotdot); in xfs_dir2_sf_to_block()
1195 blp[1].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(offset)); in xfs_dir2_sf_to_block()
1248 blp[2 + i].hashval = cpu_to_be32(xfs_dir2_hashname(mp, &name)); in xfs_dir2_sf_to_block()
1249 blp[2 + i].address = 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()