VirtualBox

Changeset 23213 in vbox


Ignore:
Timestamp:
Sep 22, 2009 12:13:15 PM (15 years ago)
Author:
vboxsync
Message:

OffStart -> offStart; 'off' is an one of the prefixes we use, similar to 'cb', see coding guidelines. (There are more 'Off' and 'somethingOffset' names here, fix them if you like.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp

    r23212 r23213  
    372372                 * need to be on a 512 boundary. */
    373373                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);
    375375                PDMACTASKFILETRANSFER enmTransferType = pCurr->enmTransferType;
    376376
    377377                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));
    381381
    382382                pCurr->fPrefetch = false;
    383383
    384384                if (   RT_UNLIKELY(cbToTransfer != pCurr->DataSeg.cbSeg)
    385                     || RT_UNLIKELY(OffStart != pCurr->Off)
     385                    || RT_UNLIKELY(offStart != pCurr->Off)
    386386                    || ((pEpClassFile->uBitmaskAlignment & (RTR3UINTPTR)pvBuf) != (RTR3UINTPTR)pvBuf))
    387387                {
     
    389389                    pCurr->fBounceBuffer = true;
    390390
    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;
    394394
    395395                    /** @todo: I think we need something like a RTMemAllocAligned method here.
     
    405405                    {
    406406                        if (   RT_UNLIKELY(cbToTransfer != pCurr->DataSeg.cbSeg)
    407                             || RT_UNLIKELY(OffStart != pCurr->Off))
     407                            || RT_UNLIKELY(offStart != pCurr->Off))
    408408                        {
    409409                            /* We have to fill the buffer first before we can update the data. */
     
    431431
    432432                    rc = RTFileAioReqPrepareWrite(hReq, pEndpoint->File,
    433                                                   OffStart, pvBuf, cbToTransfer, pCurr);
     433                                                  offStart, pvBuf, cbToTransfer, pCurr);
    434434                }
    435435                else
    436436                    rc = RTFileAioReqPrepareRead(hReq, pEndpoint->File,
    437                                                  OffStart, pvBuf, cbToTransfer, pCurr);
     437                                                 offStart, pvBuf, cbToTransfer, pCurr);
    438438                AssertRC(rc);
    439439
     
    735735                        pTask->fPrefetch = false;
    736736                        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);
    738738
    739739                        /* Grow the file if needed. */
     
    745745
    746746                        rc = RTFileAioReqPrepareWrite(apReqs[i], pEndpoint->File,
    747                                                       OffStart, pTask->pvBounceBuffer, cbToTransfer, pTask);
     747                                                      offStart, pTask->pvBounceBuffer, cbToTransfer, pTask);
    748748                        AssertRC(rc);
    749749                        rc = RTFileAioCtxSubmit(pAioMgr->hAioCtx, &apReqs[i], 1);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette