Lines Matching defs:fcb
139 const FCB *fcb,
144 const FCB *fcb,
183 FCB *fcb,
226 FCB * fcb;
235 fcb = GetFileControlBlock(vcb->extentsRefNum);
254 err = BTSearchRecord(fcb, btIterator, &btRecord, &btRecordSize, btIterator);
257 err = BTIterateRecord(fcb, kBTreePrevRecord, btIterator, &btRecord, &btRecordSize);
312 err = BTSearchRecord(fcb, btIterator, &btRecord, &btRecordSize, btIterator);
315 err = BTIterateRecord(fcb, kBTreePrevRecord, btIterator, &btRecord, &btRecordSize);
468 FCB *fcb, // FCB of file
492 err = SearchExtentFile(vcb, fcb, offset, &foundKey, foundData, &foundIndex, &hint, &nextFABN);
508 if (((off_t)fcb->ff_blocks * (off_t)allocBlockSize) < dataEnd) // Is PEOF shorter?
509 dataEnd = (off_t)fcb->ff_blocks * (off_t)allocBlockSize; // Yes, so only map up to PEOF
694 FCB * fcb;
698 fcb = GetFileControlBlock(vcb->extentsRefNum);
701 err = BTFlushPath(fcb);
708 if (FTOC(fcb)->c_flag & C_MODIFIED)
853 AddFileExtent(ExtendedVCB *vcb, FCB *fcb, u_int32_t startBlock, u_int32_t blockCount)
864 peof = (int64_t)(fcb->ff_blocks + blockCount) * (int64_t)vcb->blockSize;
866 error = SearchExtentFile(vcb, fcb, peof-1, &foundKey, foundData, &foundIndex, &hint, &nextBlock);
882 foundKey.fileID = FTOC(fcb)->c_fileid;
905 error = UpdateExtentRecord(vcb, fcb, &foundKey, foundData, hint);
924 FCB *fcb, // FCB of file to truncate
959 prevblocks = fcb->ff_blocks;
972 if ((((int64_t)fcb->ff_blocks * (int64_t)volumeBlockSize) + bytesToAdd) >= kTwoGigabytes)
993 fcb->ff_unallocblocks += blocksToAdd;
994 FTOC(fcb)->c_blocks += blocksToAdd;
995 fcb->ff_blocks += blocksToAdd;
997 FTOC(fcb)->c_flag |= C_MODIFIED | C_FORCEUPDATE;
1004 if (fcb->ff_unallocblocks > 0) {
1007 loanedBlocks = fcb->ff_unallocblocks;
1010 FTOC(fcb)->c_blocks -= loanedBlocks;
1011 fcb->ff_blocks -= loanedBlocks;
1012 fcb->ff_unallocblocks = 0;
1037 ((((int64_t)fcb->ff_blocks * (int64_t)volumeBlockSize) + bytesToAdd) >= kTwoGigabytes) ) {
1059 peof = ((int64_t)fcb->ff_blocks * (int64_t)volumeBlockSize) + bytesToAdd; // potential new PEOF
1060 err = SearchExtentFile(vcb, fcb, peof-1, &foundKey, foundData, &foundIndex, &hint, &nextBlock);
1063 fcb->ff_blocks = peof / volumeBlockSize;
1064 FTOC(fcb)->c_blocks += (bytesToAdd / volumeBlockSize);
1065 FTOC(fcb)->c_flag |= C_MODIFIED | C_FORCEUPDATE;
1075 bytesThisExtent = (int64_t)(nextBlock - fcb->ff_blocks) * (int64_t)volumeBlockSize;
1077 fcb->ff_blocks = nextBlock;
1078 FTOC(fcb)->c_blocks += (bytesThisExtent / volumeBlockSize);
1079 FTOC(fcb)->c_flag |= C_MODIFIED;
1145 FTOC(fcb)->c_flag |= C_FORCEUPDATE;
1152 err = UpdateExtentRecord(vcb, fcb, &foundKey, foundData, hint);
1163 if (FTOC(fcb)->c_fileid == kHFSExtentsFileID) {
1170 if (FORK_IS_RSRC(fcb))
1175 foundKey.fileID = FTOC(fcb)->c_fileid;
1206 err = UpdateExtentRecord(vcb, fcb, &foundKey, foundData, hint);
1223 fcb->ff_blocks += (bytesThisExtent / volumeBlockSize);
1224 FTOC(fcb)->c_blocks += (bytesThisExtent / volumeBlockSize);
1225 FTOC(fcb)->c_flag |= C_MODIFIED | C_FORCEUPDATE;
1249 if (prevblocks < fcb->ff_blocks) {
1250 *actualBytesAdded = (int64_t)(fcb->ff_blocks - prevblocks) * (int64_t)volumeBlockSize;
1281 FCB *fcb, // FCB of file to truncate
1308 if (FORK_IS_RSRC(fcb))
1313 temp64 = fcb->ff_blocks;
1338 FTOC(fcb)->c_blocks -= (fcb->ff_blocks - numBlocks);
1339 fcb->ff_blocks = numBlocks;
1343 FTOC(fcb)->c_flag |= C_MODIFIED | C_FORCEUPDATE;
1353 err = DeallocateFork(vcb, FTOC(fcb)->c_fileid, forkType, fcb->fcbExtents, &recordDeleted);
1359 fcb->fcbExtents[i].startBlock = 0;
1360 fcb->fcbExtents[i].blockCount = 0;
1372 err = SearchExtentFile(vcb, fcb, peof-1, &key, extentRecord, &extentIndex, &hint, &extentNextBlock);
1429 err = UpdateExtentRecord(vcb, fcb, &key, extentRecord, hint);
1439 err = TruncateExtents(vcb, forkType, FTOC(fcb)->c_fileid, nextBlock, &recordDeleted);
1457 FCB *fcb,
1475 forkType = FORK_IS_RSRC(fcb) ? kResourceForkType : kDataForkType;
1476 fileID = FTOC(fcb)->c_fileid;
1486 blkcnt = fcb->fcbExtents[i].blockCount;
1491 error = BlockDeallocate(vcb, fcb->fcbExtents[i].startBlock, blkcnt);
1503 FTOC(fcb)->c_desc.cd_nameptr ? (const char *)FTOC(fcb)->c_desc.cd_nameptr : "", error);
1508 fcb->fcbExtents[i].startBlock = 0;
1509 fcb->fcbExtents[i].blockCount = 0;
1511 tailExtents[j].startBlock = fcb->fcbExtents[i].startBlock;
1538 FTOC(fcb)->c_desc.cd_nameptr ? (const char *)FTOC(fcb)->c_desc.cd_nameptr : "", error);
1552 FTOC(fcb)->c_desc.cd_nameptr ? (const char *)FTOC(fcb)->c_desc.cd_nameptr : "", error);
1567 FTOC(fcb)->c_desc.cd_nameptr ? (const char *)FTOC(fcb)->c_desc.cd_nameptr : "", error);
1580 bcopy(tailExtents, fcb->fcbExtents, sizeof(tailExtents));
1581 blkcnt = fcb->ff_blocks - headblks;
1582 FTOC(fcb)->c_blocks -= headblks;
1583 fcb->ff_blocks = blkcnt;
1585 FTOC(fcb)->c_flag |= C_FORCEUPDATE;
1586 FTOC(fcb)->c_touch_chgtime = TRUE;
1699 // fcb - FCB pointer
1722 const FCB *fcb,
1739 bcopy ( fcb->fcbExtents, foundExtentData, sizeof(HFSPlusExtentRecord));
1769 err = FindExtentRecord(vcb, FORK_IS_RSRC(fcb) ? kResourceForkType : kDataForkType,
1770 FTOC(fcb)->c_fileid, filePositionBlock, true, foundExtentKey, foundExtentData, extentBTreeHint);
1780 err = GetFCBExtentRecord(fcb, foundExtentData);
1812 // fcb - the file that owns the extents
1825 FCB *fcb,
1833 BlockMoveData(extentData, fcb->fcbExtents, sizeof(HFSPlusExtentRecord));
1834 FTOC(fcb)->c_flag |= C_MODIFIED;
1946 const FCB *fcb,
1950 BlockMoveData(fcb->fcbExtents, extents, sizeof(HFSPlusExtentRecord));
2007 FCB *fcb,
2027 (void) GetFCBExtentRecord(fcb, extents);
2032 (int64_t)((int64_t)blocksChecked * (int64_t)vcb->blockSize) >= (int64_t)fcb->ff_size)
2042 result = FindExtentRecord(vcb, kDataForkType, fcb->ff_cp->c_fileid, startBlock, FALSE, &key, extents, &hint);