H A D | xfs_dir2_leaf.c | 64 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir3_leaf1_check() local 66 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir3_leaf1_check() 68 if (leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) { xfs_dir3_leaf1_check() 72 } else if (leafhdr.magic != XFS_DIR2_LEAF1_MAGIC) xfs_dir3_leaf1_check() 75 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); xfs_dir3_leaf1_check() 93 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir3_leaf_check_int() local 103 ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir3_leaf_check_int() 104 hdr = &leafhdr; xfs_dir3_leaf_check_int() 390 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_block_to_leaf() local 424 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_block_to_leaf() 425 leafhdr.count = be32_to_cpu(btp->count); xfs_dir2_block_to_leaf() 426 leafhdr.stale = be32_to_cpu(btp->stale); xfs_dir2_block_to_leaf() 427 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_block_to_leaf() 435 xfs_dir3_leaf_log_ents(args, lbp, 0, leafhdr.count - 1); xfs_dir2_block_to_leaf() 479 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_find_stale() 499 for (*highstale = index; *highstale < leafhdr->count; ++*highstale) { xfs_dir3_leaf_find_stale() 510 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_find_entry() 519 if (!leafhdr->stale) { xfs_dir3_leaf_find_entry() 528 if (index < leafhdr->count) xfs_dir3_leaf_find_entry() 530 (leafhdr->count - index) * sizeof(*lep)); xfs_dir3_leaf_find_entry() 536 *lfloghigh = leafhdr->count++; xfs_dir3_leaf_find_entry() 550 xfs_dir3_leaf_find_stale(leafhdr, ents, index, xfs_dir3_leaf_find_entry() 557 (highstale == leafhdr->count || xfs_dir3_leaf_find_entry() 574 leafhdr->stale--; xfs_dir3_leaf_find_entry() 594 leafhdr->stale--; xfs_dir3_leaf_find_entry() 633 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_addname() local 654 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_addname() 665 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; xfs_dir2_leaf_addname() 698 if (!leafhdr.stale) xfs_dir2_leaf_addname() 713 if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes && xfs_dir2_leaf_addname() 714 leafhdr.stale > 1) xfs_dir2_leaf_addname() 721 else if ((char *)bestsp - (char *)&ents[leafhdr.count] < needbytes) { xfs_dir2_leaf_addname() 769 xfs_dir3_leaf_compact_x1(&leafhdr, ents, &index, &lowstale, xfs_dir2_leaf_addname() 776 else if (leafhdr.stale) { xfs_dir2_leaf_addname() 777 lfloglow = leafhdr.count; xfs_dir2_leaf_addname() 882 lep = xfs_dir3_leaf_find_entry(&leafhdr, ents, index, compact, lowstale, xfs_dir2_leaf_addname() 895 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_leaf_addname() 910 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_compact() 921 if (!leafhdr->stale) xfs_dir3_leaf_compact() 928 for (from = to = 0, loglow = -1; from < leafhdr->count; from++) { xfs_dir3_leaf_compact() 944 ASSERT(leafhdr->stale == from - to); xfs_dir3_leaf_compact() 945 leafhdr->count -= leafhdr->stale; xfs_dir3_leaf_compact() 946 leafhdr->stale = 0; xfs_dir3_leaf_compact() 948 dp->d_ops->leaf_hdr_to_disk(leaf, leafhdr); xfs_dir3_leaf_compact() 964 struct xfs_dir3_icleaf_hdr *leafhdr, xfs_dir3_leaf_compact_x1() 980 ASSERT(leafhdr->stale > 1); xfs_dir3_leaf_compact_x1() 983 xfs_dir3_leaf_find_stale(leafhdr, ents, index, &lowstale, &highstale); xfs_dir3_leaf_compact_x1() 989 (highstale == leafhdr->count || xfs_dir3_leaf_compact_x1() 998 for (from = to = 0; from < leafhdr->count; from++) { xfs_dir3_leaf_compact_x1() 1033 leafhdr->count -= from - to; xfs_dir3_leaf_compact_x1() 1034 leafhdr->stale = 1; xfs_dir3_leaf_compact_x1() 1042 highstale = leafhdr->count; xfs_dir3_leaf_compact_x1() 1043 *highlogp = leafhdr->count - 1; xfs_dir3_leaf_compact_x1() 1226 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_lookup_int() local 1240 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_lookup_int() 1251 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; xfs_dir2_leaf_lookup_int() 1358 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_removename() local 1373 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_removename() 1396 leafhdr.stale++; xfs_dir2_leaf_removename() 1397 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_leaf_removename() 1547 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_leaf_search_hash() local 1551 args->dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_leaf_search_hash() 1557 for (lep = ents, low = 0, high = leafhdr.count - 1, xfs_dir2_leaf_search_hash() 1688 struct xfs_dir3_icleaf_hdr leafhdr; xfs_dir2_node_to_leaf() local 1739 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); xfs_dir2_node_to_leaf() 1741 ASSERT(leafhdr.magic == XFS_DIR2_LEAFN_MAGIC || xfs_dir2_node_to_leaf() 1742 leafhdr.magic == XFS_DIR3_LEAFN_MAGIC); xfs_dir2_node_to_leaf() 1759 if (xfs_dir3_leaf_size(&leafhdr, freehdr.nvalid) > args->geo->blksize) { xfs_dir2_node_to_leaf() 1767 if (leafhdr.stale) xfs_dir2_node_to_leaf() 1768 xfs_dir3_leaf_compact(args, &leafhdr, lbp); xfs_dir2_node_to_leaf() 1772 leafhdr.magic = (leafhdr.magic == XFS_DIR2_LEAFN_MAGIC) xfs_dir2_node_to_leaf() 1788 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); xfs_dir2_node_to_leaf() 478 xfs_dir3_leaf_find_stale( struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_dir2_leaf_entry *ents, int index, int *lowstale, int *highstale) xfs_dir3_leaf_find_stale() argument 509 xfs_dir3_leaf_find_entry( struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_dir2_leaf_entry *ents, int index, int compact, int lowstale, int highstale, int *lfloglow, int *lfloghigh) xfs_dir3_leaf_find_entry() argument 908 xfs_dir3_leaf_compact( xfs_da_args_t *args, struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_buf *bp) xfs_dir3_leaf_compact() argument 963 xfs_dir3_leaf_compact_x1( struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_dir2_leaf_entry *ents, int *indexp, int *lowstalep, int *highstalep, int *lowlogp, int *highlogp) xfs_dir3_leaf_compact_x1() argument
|