Lines Matching defs:extents

403 				 * recently freed extents to the free extent cache once
849 * re-load meta-file info (extents, file size).
943 SWAP_BE32 (vhp->extentsFile.extents[i].startBlock);
945 SWAP_BE32 (vhp->extentsFile.extents[i].blockCount);
955 SWAP_BE32 (vhp->catalogFile.extents[i].startBlock);
957 SWAP_BE32 (vhp->catalogFile.extents[i].blockCount);
967 SWAP_BE32 (vhp->attributesFile.extents[i].startBlock);
969 SWAP_BE32 (vhp->attributesFile.extents[i].blockCount);
979 SWAP_BE32 (vhp->allocationFile.extents[i].startBlock);
981 SWAP_BE32 (vhp->allocationFile.extents[i].blockCount);
2982 * recently freed extents to the free extent cache once
3825 volumeHeader->extentsFile.extents[i].startBlock =
3827 volumeHeader->extentsFile.extents[i].blockCount =
3840 volumeHeader->catalogFile.extents[i].startBlock =
3842 volumeHeader->catalogFile.extents[i].blockCount =
3855 volumeHeader->allocationFile.extents[i].startBlock =
3857 volumeHeader->allocationFile.extents[i].blockCount =
3870 volumeHeader->attributesFile.extents[i].startBlock =
3872 volumeHeader->attributesFile.extents[i].blockCount =
3886 volumeHeader->startupFile.extents[i].startBlock =
3888 volumeHeader->startupFile.extents[i].blockCount =
4169 printf("hfs_extendfs: error %d adding extents\n", error);
4553 * Relocation of extents will result in no net change in the total
4831 * Note that we specifically *exclude* system vnodes (catalog, bitmap, extents, EAs),
4839 * Ideally, the file whose extents we are about to manipulate is using the
5013 /* Structure to store state of reclaiming extents from a
5016 * used by code that reclaims and splits the extents.
5032 HFSPlusExtentRecord overflow;/* Extent record from overflow extents btree */
5035 HFSPlusExtentDescriptor *extents; /* Pointer to current extent record being processed.
5055 * Split the current extent into two extents, with first extent
5074 * extent into multiple smaller extents, and relocate each of
5075 * the smaller extents individually. The way we do this is by
5078 * into two extents, C1 and C2, that occupy exactly the same
5119 * among code that traverses through all the extents
5120 * of the file, code that relocates extents, and
5135 HFSPlusExtentDescriptor *extents; /* Pointer to current extent record being manipulated */
5150 extents = extent_info->extents;
5161 printf ("hfs_split_extent: Split record:%u recStartBlock=%u %u:(%u,%u) for %u blocks\n", extent_info->overflow_count, extent_info->recStartBlock, index, extents[index].startBlock, extents[index].blockCount, newBlockCount);
5164 /* Extents overflow btree can not have more than 8 extents.
5167 if ((extent_info->fileID == kHFSExtentsFileID) && (extents[kHFSPlusExtentDensity - 1].blockCount != 0)) {
5168 printf ("hfs_split_extent: Maximum 8 extents allowed for extents overflow btree, cannot split further.\n");
5179 if (extents[i].blockCount == 0) {
5182 read_recStartBlock += extents[i].blockCount;
5188 shift_extent.startBlock = extents[index].startBlock + newBlockCount;
5189 shift_extent.blockCount = extents[index].blockCount - newBlockCount;
5193 /* Splitting of extents can result in at most of one
5197 shift_extent = extents[kHFSPlusExtentDensity-1];
5210 if (extents[i].blockCount) {
5211 printf ("hfs_split_extent: Shift %u:(%u,%u) to %u:(%u,%u)\n", i, extents[i].startBlock, extents[i].blockCount, i+1, extents[i].startBlock, extents[i].blockCount);
5214 extents[i+1] = extents[i];
5231 extents[index+1].startBlock = extents[index].startBlock + newBlockCount;
5232 extents[index+1].blockCount = extents[index].blockCount - newBlockCount;
5235 extents[index].blockCount = newBlockCount;
5238 printf ("hfs_split_extent: Split %u:(%u,%u) and ", index, extents[index].startBlock, extents[index].blockCount);
5240 printf ("%u:(%u,%u)\n", index+1, extents[index+1].startBlock, extents[index+1].blockCount);
5304 extents = xattr_rec->overflowExtents.extents;
5322 extents = extents_rec[0];
5399 if (extents[i].blockCount == 0) {
5402 read_recStartBlock += extents[i].blockCount;
5407 bzero(extents, sizeof(HFSPlusExtentRecord));
5409 extents[0] = shift_extent;
5410 /* There are no more overflow extents to be shifted */
5430 * trying to create, especially when the extents
5449 last_extent = extents[kHFSPlusExtentDensity-1];
5453 extents[i+1] = extents[i];
5459 extents[0] = shift_extent;
5538 * extents btree, and extents for large EAs.
5544 * among code that traverses through all the extents
5545 * of the file, code that relocates extents, and
5567 oldStartBlock = extent_info->extents[index].startBlock;
5568 oldBlockCount = extent_info->extents[index].blockCount;
5593 * We have already skipped extents that lie completely within
5603 printf ("hfs_reclaim_extent: Split straddling extent %u:(%u,%u) for %u blocks\n", idx, extent_info->extents[idx].startBlock, extent_info->extents[idx].blockCount, newBlockCount);
5613 * different extents. So we only check and trim if
5626 * btree nodes are not split across extents. Therefore this
5638 /* Split the extents into two parts --- the first extent lies
5652 printf ("hfs_reclaim_extent: Split straddling extent %u:(%u,%u) for %u blocks failed, relocate full extent\n", idx, extent_info->extents[idx].startBlock, extent_info->extents[idx].blockCount, newBlockCount);
5695 * number of blocks. For btree extents, check and trim the
5749 extent_info->extents[index].startBlock = newStartBlock;
5753 /* Update the extents in catalog record */
5766 /* Replace record for extents overflow or extents-based xattrs */
5833 * moving an extent, it can be split into smaller extents. The contents of
5834 * any moved extents are read and written via the volume's device vnode --
5854 * do not use this block or beyond. All extents
6014 extent_info->extents = extent_info->catalog_fp->ff_extents;
6015 /* Relocate extents from the catalog record */
6030 * working on overflow extents record.
6070 extent_info->extents = extent_info->record.overflow;
6745 extent_info->extents = extent_info->record.xattr.forkData.theFork.extents;
6748 extent_info->extents = extent_info->record.xattr.overflowExtents.extents;
6753 if (extent_info->extents[i].blockCount == 0) {
6792 * splitting the extents.
6846 /* If the extents of current fileID were already relocated, skip it */
6851 /* Check if any of the extents in the current record need to be relocated */
6856 if (rec.forkData.theFork.extents[i].blockCount == 0) {
6859 if ((rec.forkData.theFork.extents[i].startBlock +
6860 rec.forkData.theFork.extents[i].blockCount) > allocLimit) {
6869 if (rec.overflowExtents.extents[i].blockCount == 0) {
6872 if ((rec.overflowExtents.extents[i].startBlock +
6873 rec.overflowExtents.extents[i].blockCount) > allocLimit) {
6922 * for files with extents that overlap into the space we're trying to
6995 /* Check if any of the extents require relocation */
7128 /* Relocate extents of the Extents B-tree if they're in the way.
7129 * Relocating extents btree before other btrees is important as
7131 * the disk for relocating extents btree. Note that extents btree
7132 * can only have maximum of 8 extents.
7137 printf("hfs_reclaimspace: reclaim extents b-tree returned %d\n", error);
7141 /* Relocate extents of the Allocation file if they're in the way. */
7149 /* Relocate extents of the Catalog B-tree if they're in the way. */
7157 /* Relocate extents of the Attributes B-tree if they're in the way. */
7165 /* Relocate extents of the Startup File if there is one and they're in the way. */
7175 * any extents in the volume header. But we need to do that before
7187 /* Reclaim extents from catalog file records */
7194 /* Reclaim extents from extent-based extended attributes, if any */
7206 * Check if there are any extents (including overflow extents) that overlap
7210 * true - One of the extents need to be relocated
7211 * false - No overflow extents need to be relocated, or there was an error
7229 if (filerec->dataFork.extents[i].blockCount == 0) {
7232 endblock = filerec->dataFork.extents[i].startBlock +
7233 filerec->dataFork.extents[i].blockCount;
7242 if (filerec->resourceFork.extents[j].blockCount == 0) {
7245 endblock = filerec->resourceFork.extents[j].startBlock +
7246 filerec->resourceFork.extents[j].blockCount;
7253 /* Return back if there are no overflow extents for this file */