Lines Matching full:we
48 * AG. Therefore, we can recreate the free extent records in an AG by looking
60 * walking the rmapbt records, we create a second bitmap @not_allocbt_blocks to
72 * The OWN_AG bitmap itself isn't needed after this point, so what we really do
83 * written to the new btree indices. We reconstruct both bnobt and cntbt at
84 * the same time since we've already done all the work.
86 * We use the prefix 'xrep_abt' here because we regenerate both free space
118 * Next block we anticipate seeing in the rmap records. If the next
119 * rmap record is greater than next_agbno, we have found unused space.
126 /* Longest free extent we found in the AG. */
138 * Make sure the busy extent list is clear because we can't put extents in xrep_setup_ag_allocbt()
191 * Stash a free space record for all the space since the last bno we found
255 * next_agbno as far out into the AG space as we currently know about. in xrep_abt_walk_rmap()
275 * Compare two free space extents by block number. We want to sort in order of
294 * Re-sort the free extents by block number so that we can put the records into
322 * Compare two free space extents by length and then block number. We want
342 * Sort the free extents by length so so that we can put the records into the
343 * cntbt in the correct order. Don't let userspace kill us if we're resorting
417 * We're going to use the observed free space records to reserve blocks for the
418 * new free space btrees, so we play an iterative game where we try to converge
419 * on the number of blocks we need:
421 * 1. Estimate how many blocks we'll need to store the records.
422 * 2. If the first free record has more blocks than we need, we're done.
423 * We will have to re-sort the records prior to building the cntbt.
424 * 3. If that record has exactly the number of blocks we need, null out the
425 * record. We're done.
426 * 4. Otherwise, we still need more blocks. Null out the record, subtract its
427 * length from the number of blocks we need, and go back to step 1.
429 * Fortunately, we don't have to do any transaction work to play this game, so
430 * we don't have to tear down the staging cursors.
451 /* Compute how many blocks we'll need. */ in xrep_abt_reserve_space()
462 /* How many btree blocks do we need to store all records? */ in xrep_abt_reserve_space()
467 /* If we've reserved enough blocks, we're done. */ in xrep_abt_reserve_space()
473 /* We need space but there's none left; bye! */ in xrep_abt_reserve_space()
499 * Record has more space than we need. The number of in xrep_abt_reserve_space()
516 * We're going to use up the entire record, so unset it and in xrep_abt_reserve_space()
518 * records (but doesn't break the sorting order), so we must in xrep_abt_reserve_space()
544 /* Add a deferred rmap for each extent we used. */ in xrep_abt_dispose_one()
550 * For each reserved btree block we didn't use, add it to the free in xrep_abt_dispose_one()
551 * space btree. We didn't touch fdblocks when we reserved them, so in xrep_abt_dispose_one()
552 * we don't touch it now. in xrep_abt_dispose_one()
569 * Deal with all the space we reserved. Blocks that were allocated for the
644 * Reset the AGF counters to reflect the free space btrees that we just
658 * btrees. This is the computed btree size minus anything we didn't in xrep_abt_reset_counters()
669 * btrees, so we must update those fields here. in xrep_abt_reset_counters()
680 * After we commit the new btree to disk, it is possible that the in xrep_abt_reset_counters()
693 /* Reinitialize with the values we just logged. */ in xrep_abt_reset_counters()
699 * If this is successful we'll return with the new btree root
714 * Sort the free extents by length so that we can set up the free space in xrep_abt_build_new_trees()
716 * deferred rmap / free work we have to do at the end. in xrep_abt_build_new_trees()
724 * new btree and setting up all the accounting information we'll need in xrep_abt_build_new_trees()
725 * to root the new btree while it's under construction and before we in xrep_abt_build_new_trees()
744 /* Last chance to abort before we start committing fixes. */ in xrep_abt_build_new_trees()
748 /* Reserve the space we'll need for the new btrees. */ in xrep_abt_build_new_trees()
754 * If we need to re-sort the free extents by length, do so so that we in xrep_abt_build_new_trees()
766 * height so that we don't trip the verifiers when writing the new in xrep_abt_build_new_trees()
798 /* Reset the AGF counters now that we've changed the btree shape. */ in xrep_abt_build_new_trees()
820 * Now that we've logged the roots of the new btrees, invalidate all of the
837 * Now that we've zapped all the old allocbt blocks we can turn off in xrep_abt_remove_old_trees()
855 /* We require the rmapbt to rebuild anything. */ in xrep_allocbt()
864 /* We rebuild both data structures. */ in xrep_allocbt()
868 * Make sure the busy extent list is clear because we can't put extents in xrep_allocbt()
869 * on there twice. In theory we cleared this before we started, but in xrep_allocbt()
910 /* Make sure both btrees are ok after we've rebuilt them. */
919 * We must update sm_type temporarily so that the tree-to-tree cross in xrep_revalidate_allocbt()