Lines Matching defs:extents

151 					with multiple extents in the cache, and handles splitting an
157 input extent with extents already in the cache.
207 the end of the block. Free space extents are inserted into the appropriate red-black tree.
462 blockno_offset = trim->extents[i].offset;
465 numblocks = trim->extents[i].length / hfsmp->blockSize;
585 list->extents[extent_no].offset = offset;
586 list->extents[extent_no].length = length;
615 unmap.extents = list->extents;
621 bzero (list->extents, (list->allocated_count * sizeof(dk_extent_t)));
674 ; Function: This function is called when a transaction that freed extents
677 ; extents to the free extent cache so that they can be reused.
681 ; of those extents. We must be very careful about which locks
684 ; lock (just long enough to add these extents to the cache).
688 ; will stop getting called, even if extents got freed before
692 ; arg - The hfsmount of the volume containing the extents.
693 ; extent_count - The number of extents freed in the transaction.
694 ; extents - An array of extents (byte ranges) that were freed.
698 hfs_trim_callback(void *arg, uint32_t extent_count, const dk_extent_t *extents)
708 /* Convert the byte range in *extents back to a range of allocation blocks. */
709 startBlock = (extents[i].offset - hfsmp->hfsPlusIOPosOffset) / hfsmp->blockSize;
710 numBlocks = extents[i].length / hfsmp->blockSize;
743 dk_extent_t *extents;
749 void *extents = kalloc (alloc_count * sizeof(dk_extent_t));
750 if (extents == NULL) {
753 trimlist.extents = (dk_extent_t*)extents;
770 if (trimlist.extents) {
771 kfree (trimlist.extents, (trimlist.allocated_count * sizeof(dk_extent_t)));
988 * Scan the bitmap once, gather the N largest free extents, then
989 * allocate from these largest extents. Repeat as needed until
1565 * in order to manage free space extents. This will search the red-black tree
1649 * appropriate free extents, searching by size in the normal allocation zone.
2465 * not be picking extents from their start. Do a check here, find if the specified
2947 * not in the offset tree, since it should be tracking free extents, rather than allocated
2948 * extents
2984 * If we encounter an error in adding the extents to the rb-tree, then immediately
3384 * If the region should be free, then we expect to see extents in the tree
3810 * does not have enough extents to satisfy an allocation request.
4188 * In the shrinking case, we'll have to remove all free extents from the red-black
4209 * it does not have any extents beyond end of current
4354 * Remove an extent from the list of free extents.
4359 * extents in the list will be shifted up.
4386 * Add an extent to the list of free extents.
4408 /* ALLOC_DEBUG: Make sure no extents in the list overlap or are contiguous with the input extent. */
4452 * If we'll be keeping any extents after the insert position, then shift them.
4472 * also handles removing an extent that overlaps multiple extents in
4501 * Iterate over all of the extents in the free extent cache, removing or
4538 * two discontiguous extents (the "head" and "tail"). The good
4539 * news is that we don't need to examine any other extents in
4560 * following extents haven't changed position.
4590 * extents into a single, larger extent.
4621 * casing will need to be done on the allocation side, where we may favor free extents
4644 * Make a pass through the free extent cache, looking for known extents that
4646 * extents from the cache, and incorporate them into the new extent to be added.
4714 * very long for large extents that get added to the list.