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, false);
199 struct xfs_dir3_icleaf_hdr leafhdr;
206 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, bp->b_addr);
207 return xfs_dir3_leaf_check_int(mp, &leafhdr, bp->b_addr, true);
402 struct xfs_dir3_icleaf_hdr leafhdr;
435 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
436 leafhdr.count = be32_to_cpu(btp->count);
437 leafhdr.stale = be32_to_cpu(btp->stale);
438 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
445 memcpy(leafhdr.ents, blp,
447 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, 0, leafhdr.count - 1);
491 struct xfs_dir3_icleaf_hdr *leafhdr,
511 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) {
522 struct xfs_dir3_icleaf_hdr *leafhdr,
531 if (!leafhdr->stale) {
540 if (index < leafhdr->count)
542 (leafhdr->count - index) * sizeof(*lep));
548 *lfloghigh = leafhdr->count++;
562 xfs_dir3_leaf_find_stale(leafhdr, ents, index,
569 (highstale == leafhdr->count ||
586 leafhdr->stale--;
606 leafhdr->stale--;
617 struct xfs_dir3_icleaf_hdr leafhdr;
662 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
663 ents = leafhdr.ents;
674 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval;
707 if (!leafhdr.stale)
722 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes &&
723 leafhdr.stale > 1)
730 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) {
778 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale,
785 else if (leafhdr.stale) {
786 lfloglow = leafhdr.count;
894 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale,
907 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
909 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, lfloglow, lfloghigh);
922 struct xfs_dir3_icleaf_hdr *leafhdr,
932 if (!leafhdr->stale)
938 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) {
939 if (leafhdr->ents[from].address ==
948 leafhdr->ents[to] = leafhdr->ents[from];
955 ASSERT(leafhdr->stale == from - to);
956 leafhdr->count -= leafhdr->stale;
957 leafhdr->stale = 0;
959 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, leafhdr);
962 xfs_dir3_leaf_log_ents(args, leafhdr, bp, loglow, to - 1);
975 struct xfs_dir3_icleaf_hdr *leafhdr,
991 ASSERT(leafhdr->stale > 1);
994 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale);
1000 (highstale == leafhdr->count ||
1009 for (from = to = 0; from < leafhdr->count; from++) {
1044 leafhdr->count -= from - to;
1045 leafhdr->stale = 1;
1053 highstale = leafhdr->count;
1054 *highlogp = leafhdr->count - 1;
1170 struct xfs_dir3_icleaf_hdr leafhdr;
1177 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1188 lep = &leafhdr.ents[index];
1219 struct xfs_dir3_icleaf_hdr *leafhdr)
1247 xfs_dir2_leaf_hdr_from_disk(mp, leafhdr, leaf);
1257 for (lep = &leafhdr->ents[index];
1258 index < leafhdr->count &&
1366 struct xfs_dir3_icleaf_hdr leafhdr;
1373 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1386 lep = &leafhdr.ents[index];
1408 leafhdr.stale++;
1409 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
1413 xfs_dir3_leaf_log_ents(args, &leafhdr, lbp, index, index);
1504 struct xfs_dir3_icleaf_hdr leafhdr;
1511 error = xfs_dir2_leaf_lookup_int(args, &lbp, &index, &dbp, &leafhdr);
1519 lep = &leafhdr.ents[index];
1555 struct xfs_dir3_icleaf_hdr leafhdr;
1557 xfs_dir2_leaf_hdr_from_disk(args->dp->i_mount, &leafhdr, lbp->b_addr);
1563 for (lep = leafhdr.ents, low = 0, high = leafhdr.count - 1,
1694 struct xfs_dir3_icleaf_hdr leafhdr;
1745 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf);
1747 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC ||
1748 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC);
1764 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > args->geo->blksize) {
1772 if (leafhdr.stale)
1773 xfs_dir3_leaf_compact(args, &leafhdr, lbp);
1777 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC)
1793 xfs_dir2_leaf_hdr_to_disk(mp, leaf, &leafhdr);