Lines Matching refs:leafhdr
28 struct xfs_dir3_icleaf_hdr *leafhdr);
105 struct xfs_dir3_icleaf_hdr leafhdr;
107 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
109 if (leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) {
113 } else if (leafhdr.magic != XFS_DIR2_LEAF1_MAGIC)
116 return xfs_dir3_leaf_check_int(dp->i_mount, &leafhdr, leaf);
190 struct xfs_dir3_icleaf_hdr leafhdr;
197 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, bp->b_addr);
198 return xfs_dir3_leaf_check_int(mp, &leafhdr, bp->b_addr);
393 struct xfs_dir3_icleaf_hdr leafhdr;
426 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
427 leafhdr.count = be32_to_cpu(btp->count);
428 leafhdr.stale = be32_to_cpu(btp->stale);
429 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
436 memcpy(leafhdr.ents, blp,
438 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, 0, leafhdr.count - 1);
482 struct xfs_dir3_icleaf_hdr *leafhdr,
502 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) {
513 struct xfs_dir3_icleaf_hdr *leafhdr,
522 if (!leafhdr->stale) {
531 if (index < leafhdr->count)
533 (leafhdr->count - index) * sizeof(*lep));
539 *lfloghigh = leafhdr->count++;
553 xfs_dir3_leaf_find_stale(leafhdr, ents, index,
560 (highstale == leafhdr->count ||
577 leafhdr->stale--;
597 leafhdr->stale--;
608 struct xfs_dir3_icleaf_hdr leafhdr;
653 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
654 ents = leafhdr.ents;
665 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval;
698 if (!leafhdr.stale)
713 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes &&
714 leafhdr.stale > 1)
721 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) {
769 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale,
776 else if (leafhdr.stale) {
777 lfloglow = leafhdr.count;
885 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale,
898 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
900 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, lfloglow, lfloghigh);
913 struct xfs_dir3_icleaf_hdr *leafhdr,
923 if (!leafhdr->stale)
929 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) {
930 if (leafhdr->ents[from].address ==
939 leafhdr->ents[to] = leafhdr->ents[from];
946 ASSERT(leafhdr->stale == from - to);
947 leafhdr->count -= leafhdr->stale;
948 leafhdr->stale = 0;
950 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, leafhdr);
953 xfs_dir3_leaf_log_ents(args, leafhdr, bp, loglow, to - 1);
966 struct xfs_dir3_icleaf_hdr *leafhdr,
982 ASSERT(leafhdr->stale > 1);
985 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale);
991 (highstale == leafhdr->count ||
1000 for (from = to = 0; from < leafhdr->count; from++) {
1035 leafhdr->count -= from - to;
1036 leafhdr->stale = 1;
1044 highstale = leafhdr->count;
1045 *highlogp = leafhdr->count - 1;
1161 struct xfs_dir3_icleaf_hdr leafhdr;
1168 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1179 lep = &leafhdr.ents[index];
1210 struct xfs_dir3_icleaf_hdr *leafhdr)
1238 xfs_dir2_leaf_hdr_from_disk(mp, leafhdr, leaf);
1248 for (lep = &leafhdr->ents[index];
1249 index < leafhdr->count &&
1357 struct xfs_dir3_icleaf_hdr leafhdr;
1364 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1377 lep = &leafhdr.ents[index];
1399 leafhdr.stale++;
1400 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
1404 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, index, index);
1495 struct xfs_dir3_icleaf_hdr leafhdr;
1502 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1510 lep = &leafhdr.ents[index];
1546 struct xfs_dir3_icleaf_hdr leafhdr;
1548 xfs_dir2_leaf_hdr_from_disk(args->dp->i_mount, &leafhdr, lbp->b_addr);
1554 for (lep = leafhdr.ents, low = 0, high = leafhdr.count - 1,
1685 struct xfs_dir3_icleaf_hdr leafhdr;
1736 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf);
1738 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC ||
1739 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC);
1755 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > args->geo->blksize) {
1763 if (leafhdr.stale)
1764 xfs_dir3_leaf_compact(args, &leafhdr, lbp);
1768 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC)
1784 xfs_dir2_leaf_hdr_to_disk(mp, leaf, &leafhdr);