Lines Matching defs:leaf

65 	struct xfs_dir2_leaf	*leaf = bp->b_addr;
68 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
77 return xfs_dir3_leaf_check_int(dp->i_mount, &leafhdr, leaf, false);
402 * Convert a leaf-format directory to a node-format directory.
403 * We need to change the magic number of the leaf block, and copy
404 * the freespace table out of the leaf block into its own block.
409 struct xfs_buf *lbp) /* leaf buffer */
416 int i; /* leaf freespace index */
417 xfs_dir2_leaf_t *leaf; /* leaf structure */
418 xfs_dir2_leaf_tail_t *ltp; /* leaf tail structure */
443 leaf = lbp->b_addr;
444 ltp = xfs_dir2_leaf_tail_p(args->geo, leaf);
453 * Copy freespace entries from the leaf block to the new block.
475 * Converting the leaf to a leafnode is just a matter of changing the
480 if (leaf->hdr.info.magic == cpu_to_be16(XFS_DIR2_LEAF1_MAGIC))
481 leaf->hdr.info.magic = cpu_to_be16(XFS_DIR2_LEAFN_MAGIC);
483 leaf->hdr.info.magic = cpu_to_be16(XFS_DIR3_LEAFN_MAGIC);
492 * Add a leaf entry to a leaf block in a node-form directory.
497 struct xfs_buf *bp, /* leaf buffer */
503 struct xfs_dir2_leaf *leaf = bp->b_addr;
508 int lfloghigh; /* high leaf entry logging */
509 int lfloglow; /* low leaf entry logging */
514 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
528 * If there are already the maximum number of leaf entries in
548 * Compact out all but one stale leaf entry. Leaves behind
572 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
599 * Return the last hash value in the leaf.
605 struct xfs_buf *bp, /* leaf buffer */
606 int *count) /* count of entries in leaf */
625 * Look up a leaf entry for space to add a name in a node-format leaf block.
630 struct xfs_buf *bp, /* leaf buffer */
632 int *indexp, /* out: leaf entry index */
642 int index; /* leaf entry index */
643 xfs_dir2_leaf_t *leaf; /* leaf structure */
645 xfs_dir2_leaf_entry_t *lep; /* leaf entry */
655 leaf = bp->b_addr;
656 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf);
662 * Look up the hash value in the leaf entries.
678 * Loop over leaf entries with the right hash value.
684 * Skip stale leaf entries.
779 * Look up a leaf entry in a node-format leaf block.
784 struct xfs_buf *bp, /* leaf buffer */
786 int *indexp, /* out: leaf entry index */
794 int index; /* leaf entry index */
795 xfs_dir2_leaf_t *leaf; /* leaf structure */
796 xfs_dir2_leaf_entry_t *lep; /* leaf entry */
806 leaf = bp->b_addr;
807 xfs_dir2_leaf_hdr_from_disk(mp, &leafhdr, leaf);
817 * Look up the hash value in the leaf entries.
828 * Loop over leaf entries with the right hash value.
834 * Skip stale leaf entries.
933 * Look up a leaf entry in a node-format leaf block.
939 struct xfs_buf *bp, /* leaf buffer */
941 int *indexp, /* out: leaf entry index */
951 * Move count leaf entries from source to destination leaf.
960 int start_s,/* source leaf index */
964 int start_d,/* destination leaf index */
979 * destination leaf entries, open up a hole in the destination
993 int i; /* temp leaf index */
1003 * Copy the leaf entries from source to destination.
1030 * Determine the sort order of two leaf blocks.
1060 * Rebalance leaf entries between two leaf blocks.
1074 int isleft; /* new goes in left leaf */
1075 xfs_dir2_leaf_t *leaf1; /* first leaf structure */
1076 xfs_dir2_leaf_t *leaf2; /* second leaf structure */
1077 int mid; /* midpoint leaf index */
1081 int oldsum; /* old total leaf count */
1082 int swap_blocks; /* swapped leaf blocks */
1111 * If the old leaf count was odd then the new one will be even,
1157 * Mark whether we're inserting into the old or new leaf.
1179 "%s: picked the wrong leaf? reverting original leaf: blk1->index %d",
1263 * This removes the leaf entry and the data entry,
1269 struct xfs_buf *bp, /* leaf buffer */
1270 int index, /* leaf entry index */
1280 xfs_dir2_leaf_t *leaf; /* leaf structure */
1281 xfs_dir2_leaf_entry_t *lep; /* leaf entry */
1294 leaf = bp->b_addr;
1295 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
1311 * Kill the leaf entry by marking it stale.
1312 * Log the leaf block changes.
1315 xfs_dir2_leaf_hdr_to_disk(dp->i_mount, leaf, &leafhdr);
1411 * Return indication of whether this leaf block is empty enough
1421 * Split the leaf entries in the old block into old and new blocks.
1430 xfs_dablk_t blkno; /* new leaf block number */
1435 * Allocate space for a new leaf node.
1445 * Initialize the new leaf block.
1481 * Check a leaf block and its neighbors to see if the block should be
1494 xfs_da_state_blk_t *blk; /* leaf block */
1495 xfs_dablk_t blkno; /* leaf block number */
1496 struct xfs_buf *bp; /* leaf buffer */
1498 int count; /* leaf live entry count */
1502 xfs_dir2_leaf_t *leaf; /* leaf structure */
1514 leaf = blk->bp->b_addr;
1515 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
1563 * Read the sibling leaf block.
1576 leaf = bp->b_addr;
1577 xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &hdr2, leaf);
1616 * Move all the leaf entries from drop_blk to save_blk.
1626 xfs_dir2_leaf_t *drop_leaf; /* dead leaf structure */
1627 xfs_dir2_leaf_t *save_leaf; /* surviving leaf structure */
1646 * If there are any stale leaf entries, take this opportunity
1897 * The leaf entry is added in xfs_dir2_leafn_add.
2015 xfs_da_state_blk_t *blk; /* leaf block for insert */
2048 * Add the new leaf entry.
2059 * It didn't work, we need to split the leaf block.
2066 * Split the leaf block and insert the new entry.
2112 * Release the btree blocks and leaf block.
2136 struct xfs_da_state_blk *blk; /* leaf block */
2163 * Remove the leaf and data entries.
2175 * If we need to join leaf blocks, do it.
2180 * If no errors so far, try conversion to leaf format.
2196 xfs_da_state_blk_t *blk; /* leaf block */
2235 * Find the leaf entry.