• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/hfs/hfscommon/Catalog/

Lines Matching defs:extents

44 static u_int32_t CheckExtents( void *extents, u_int32_t blocks, Boolean isHFSPlus );
73 //-- Step 1: Check the catalog nodes for extents
75 //-- locate the source file, test for extents in extent file, and copy the cat record for later
82 //-- Check if there are any extents in the source file
83 //�� I am only checling the extents in the low 32 bits, routine will fail if files extents after 2 gig are in overflow
84 numSrcExtentBlocks = CheckExtents( srcData.hfsPlusFile.dataFork.extents, srcData.hfsPlusFile.dataFork.totalBlocks, isHFSPlus );
85 if ( numSrcExtentBlocks == 0 ) // then check the resource fork extents
86 numSrcExtentBlocks = CheckExtents( srcData.hfsPlusFile.resourceFork.extents, srcData.hfsPlusFile.resourceFork.totalBlocks, isHFSPlus );
88 //-- Check if there are any extents in the destination file
95 numDestExtentBlocks = CheckExtents( destData.hfsPlusFile.dataFork.extents, destData.hfsPlusFile.dataFork.totalBlocks, isHFSPlus );
96 if ( numDestExtentBlocks == 0 ) // then check the resource fork extents
97 numDestExtentBlocks = CheckExtents( destData.hfsPlusFile.resourceFork.extents, destData.hfsPlusFile.resourceFork.totalBlocks, isHFSPlus );
101 //-- Exchange the extents key in the extent file
105 if ( numSrcExtentBlocks && numDestExtentBlocks ) // if both files have extents
107 //-- Change the source extents file ids to our known bogus value
117 //-- Change the destination extents file id's to the source id's
127 err = MoveExtents( vcb, kHFSBogusExtentFileID, srcData.hfsPlusFile.fileID, isHFSPlus ); // Move the extents back
133 //-- Change the bogus extents file id's to the dest id's
143 err = MoveExtents( vcb, srcData.hfsPlusFile.fileID, destData.hfsPlusFile.fileID, isHFSPlus ); // Move the extents back
150 else if ( numSrcExtentBlocks ) // just the source file has extents
164 else if ( numDestExtentBlocks ) // just the destination file has extents
203 //-- Step 1: Check the catalog nodes for extents
205 //-- locate the source file, test for extents in extent file, and copy the cat record for later
212 //-- Check if there are any extents in the source file
214 if ( numSrcExtentBlocks == 0 ) // then check the resource fork extents
221 //-- Check if there are any extents in the destination file
229 if ( numDestExtentBlocks == 0 ) // then check the resource fork extents
237 //-- Exchange the extents key in the extent file
241 if ( numSrcExtentBlocks && numDestExtentBlocks ) // if both files have extents
243 //-- Change the source extents file ids to our known bogus value
258 //-- Change the destination extents file id's to the source id's
268 err = MoveExtents( vcb, kHFSBogusExtentFileID, srcData.hfsFile.fileID, isHFSPlus ); // Move the extents back
274 //-- Change the bogus extents file id's to the dest id's
284 err = MoveExtents( vcb, srcData.hfsFile.fileID, destData.hfsFile.fileID, isHFSPlus ); // Move the extents back
291 else if ( numSrcExtentBlocks ) // just the source file has extents
305 else if ( numDestExtentBlocks ) // just the destination file has extents
468 if ( err == btNotFound ) // Did we run out of extent records in the extents tree?
541 //-- Delete all extents in extent file that have the ID given.
619 // Check if there are extents represented in the extents overflow file.
620 static u_int32_t CheckExtents( void *extents, u_int32_t totalBlocks, Boolean isHFSPlus )
635 extentAllocationBlocks += ((HFSPlusExtentDescriptor *)extents)[i].blockCount;
636 if ( extentAllocationBlocks >= totalBlocks ) // greater than or equal (extents can add past eof if 'Close" crashes w/o truncating new clump)
644 extentAllocationBlocks += ((HFSExtentDescriptor *)extents)[i].blockCount;
645 if ( extentAllocationBlocks >= totalBlocks ) // greater than or equal (extents can add past eof if 'Close" crashes w/o truncating new clump)