X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/d7e50217d7adf6e52786a38bcaa4cd698cb9a79e..55e303ae13a4cf49d70f2294092726f2fffb9ef2:/bsd/hfs/hfscommon/headers/FileMgrInternal.h diff --git a/bsd/hfs/hfscommon/headers/FileMgrInternal.h b/bsd/hfs/hfscommon/headers/FileMgrInternal.h index 2ed9ad24f..83bd5b902 100644 --- a/bsd/hfs/hfscommon/headers/FileMgrInternal.h +++ b/bsd/hfs/hfscommon/headers/FileMgrInternal.h @@ -118,6 +118,7 @@ enum { kEFReserveMask = 0x04, /* keep block reserve */ kEFDeferMask = 0x08, /* defer file block allocations */ kEFNoClumpMask = 0x10, /* don't round up to clump size */ + kEFMetadataMask = 0x20, /* metadata allocation */ kTFTrunExtBit = 0, /* truncate to the extent containing new PEOF*/ kTFTrunExtMask = 1 @@ -289,9 +290,10 @@ ReplaceBTreeRecord (FileReference refNum, EXTERN_API_C( OSErr ) BlockAllocate (ExtendedVCB * vcb, UInt32 startingBlock, - SInt64 bytesRequested, - SInt64 bytesMaximum, + UInt32 minBlocks, + UInt32 maxBlocks, Boolean forceContiguous, + Boolean useMetaZone, UInt32 * startBlock, UInt32 * actualBlocks); @@ -300,10 +302,19 @@ BlockDeallocate (ExtendedVCB * vcb, UInt32 firstBlock, UInt32 numBlocks); +EXTERN_API_C( OSErr ) +BlockMarkAllocated(ExtendedVCB *vcb, UInt32 startingBlock, UInt32 numBlocks); + +EXTERN_API_C( OSErr ) +BlockMarkFree( ExtendedVCB *vcb, UInt32 startingBlock, UInt32 numBlocks); + EXTERN_API_C( UInt32 ) FileBytesToBlocks (SInt64 numerator, UInt32 denominator); +EXTERN_API_C( UInt32 ) +MetaZoneFreeBlocks(ExtendedVCB *vcb); + /* File Extent Mapping routines*/ EXTERN_API_C( OSErr ) FlushExtentFile (ExtendedVCB * vcb); @@ -338,6 +349,9 @@ MapFileBlockC (ExtendedVCB * vcb, daddr_t * startBlock, size_t * availableBytes); +EXTERN_API_C( int ) +AddFileExtent (ExtendedVCB *vcb, FCB *fcb, UInt32 startBlock, UInt32 blockCount); + #if TARGET_API_MACOS_X EXTERN_API_C( Boolean ) NodesAreContiguous (ExtendedVCB * vcb,