VirtualBox

Changeset 65889 in vbox


Ignore:
Timestamp:
Feb 27, 2017 3:03:50 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113677
Message:

DrvVD: Don't sync the last chunk to guest memory as it is done in the completion worker routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r65888 r65889  
    32733273        else if (rc == VINF_VD_ASYNC_IO_FINISHED)
    32743274        {
    3275             if (pIoReq->enmType == PDMMEDIAEXIOREQTYPE_READ)
    3276                 rc = drvvdMediaExIoReqBufSync(pThis, pIoReq, false /* fToIoBuf */);
     3275            /*
     3276             * Don't sync the buffer or update the I/O state for the last chunk as it is done
     3277             * already in the completion worker called below.
     3278             */
     3279            if (cbReqIo < pIoReq->ReadWrite.cbReqLeft)
     3280            {
     3281                if (pIoReq->enmType == PDMMEDIAEXIOREQTYPE_READ)
     3282                    rc = drvvdMediaExIoReqBufSync(pThis, pIoReq, false /* fToIoBuf */);
     3283                else
     3284                    rc = VINF_SUCCESS;
     3285                pIoReq->ReadWrite.offStart  += cbReqIo;
     3286                pIoReq->ReadWrite.cbReqLeft -= cbReqIo;
     3287            }
    32773288            else
     3289            {
    32783290                rc = VINF_SUCCESS;
    3279             pIoReq->ReadWrite.offStart  += cbReqIo;
    3280             pIoReq->ReadWrite.cbReqLeft -= cbReqIo;
     3291                break;
     3292            }
    32813293        }
    32823294    }
    32833295
    32843296    if (rc != VINF_PDM_MEDIAEX_IOREQ_IN_PROGRESS)
    3285     {
    3286         Assert(!pIoReq->ReadWrite.cbReqLeft || RT_FAILURE(rc));
    32873297        rc = drvvdMediaExIoReqCompleteWorker(pThis, pIoReq, rc, fUpNotify);
    3288     }
    32893298
    32903299    LogFlowFunc(("returns %Rrc\n", rc));
Note: See TracChangeset for help on using the changeset viewer.

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