Changeset 23213 in vbox
- Timestamp:
- Sep 22, 2009 12:13:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
r23212 r23213 372 372 * need to be on a 512 boundary. */ 373 373 size_t cbToTransfer = RT_ALIGN_Z(pCurr->DataSeg.cbSeg, 512); 374 RTFOFF OffStart = pCurr->Off & ~(RTFOFF)(512-1);374 RTFOFF offStart = pCurr->Off & ~(RTFOFF)(512-1); 375 375 PDMACTASKFILETRANSFER enmTransferType = pCurr->enmTransferType; 376 376 377 377 AssertMsg( pCurr->enmTransferType == PDMACTASKFILETRANSFER_WRITE 378 || (uint64_t)( OffStart + cbToTransfer) <= pEndpoint->cbFile,379 ("Read exceeds file size OffStart=%RTfoff cbToTransfer=%d cbFile=%llu\n",380 OffStart, cbToTransfer, pEndpoint->cbFile));378 || (uint64_t)(offStart + cbToTransfer) <= pEndpoint->cbFile, 379 ("Read exceeds file size offStart=%RTfoff cbToTransfer=%d cbFile=%llu\n", 380 offStart, cbToTransfer, pEndpoint->cbFile)); 381 381 382 382 pCurr->fPrefetch = false; 383 383 384 384 if ( RT_UNLIKELY(cbToTransfer != pCurr->DataSeg.cbSeg) 385 || RT_UNLIKELY( OffStart != pCurr->Off)385 || RT_UNLIKELY(offStart != pCurr->Off) 386 386 || ((pEpClassFile->uBitmaskAlignment & (RTR3UINTPTR)pvBuf) != (RTR3UINTPTR)pvBuf)) 387 387 { … … 389 389 pCurr->fBounceBuffer = true; 390 390 391 AssertMsg(pCurr->Off >= OffStart, ("Overflow in calculation Off=%llu OffStart=%llu\n",392 pCurr->Off, OffStart));393 pCurr->uBounceBufOffset = pCurr->Off - OffStart;391 AssertMsg(pCurr->Off >= offStart, ("Overflow in calculation Off=%llu offStart=%llu\n", 392 pCurr->Off, offStart)); 393 pCurr->uBounceBufOffset = pCurr->Off - offStart; 394 394 395 395 /** @todo: I think we need something like a RTMemAllocAligned method here. … … 405 405 { 406 406 if ( RT_UNLIKELY(cbToTransfer != pCurr->DataSeg.cbSeg) 407 || RT_UNLIKELY( OffStart != pCurr->Off))407 || RT_UNLIKELY(offStart != pCurr->Off)) 408 408 { 409 409 /* We have to fill the buffer first before we can update the data. */ … … 431 431 432 432 rc = RTFileAioReqPrepareWrite(hReq, pEndpoint->File, 433 OffStart, pvBuf, cbToTransfer, pCurr);433 offStart, pvBuf, cbToTransfer, pCurr); 434 434 } 435 435 else 436 436 rc = RTFileAioReqPrepareRead(hReq, pEndpoint->File, 437 OffStart, pvBuf, cbToTransfer, pCurr);437 offStart, pvBuf, cbToTransfer, pCurr); 438 438 AssertRC(rc); 439 439 … … 735 735 pTask->fPrefetch = false; 736 736 size_t cbToTransfer = RT_ALIGN_Z(pTask->DataSeg.cbSeg, 512); 737 RTFOFF OffStart = pTask->Off & ~(RTFOFF)(512-1);737 RTFOFF offStart = pTask->Off & ~(RTFOFF)(512-1); 738 738 739 739 /* Grow the file if needed. */ … … 745 745 746 746 rc = RTFileAioReqPrepareWrite(apReqs[i], pEndpoint->File, 747 OffStart, pTask->pvBounceBuffer, cbToTransfer, pTask);747 offStart, pTask->pvBounceBuffer, cbToTransfer, pTask); 748 748 AssertRC(rc); 749 749 rc = RTFileAioCtxSubmit(pAioMgr->hAioCtx, &apReqs[i], 1);
Note:
See TracChangeset
for help on using the changeset viewer.