VirtualBox

Changeset 64025 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Sep 26, 2016 6:53:10 PM (8 years ago)
Author:
vboxsync
Message:

Storage/DrvVD: Assertions + and honor the sync flag for I/O requests

File:
1 edited

Legend:

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

    r64019 r64025  
    26132613
    26142614    Assert(pIoReq->enmType == PDMMEDIAEXIOREQTYPE_READ || pIoReq->enmType == PDMMEDIAEXIOREQTYPE_WRITE);
     2615    Assert(pIoReq->ReadWrite.cbIoBuf > 0);
    26152616
    26162617    /* Make sure the buffer is reset. */
     
    28492850    {
    28502851        /* Adjust the remaining amount to transfer. */
     2852        Assert(pIoReq->ReadWrite.cbIoBuf > 0);
     2853
    28512854        size_t cbReqIo = RT_MIN(pIoReq->ReadWrite.cbReqLeft, pIoReq->ReadWrite.cbIoBuf);
    28522855        pIoReq->ReadWrite.offStart  += cbReqIo;
     
    28872890        rc = VINF_PDM_MEDIAEX_IOREQ_IN_PROGRESS;
    28882891    }
     2892    else
     2893        Assert(pIoReq->ReadWrite.cbIoBuf > 0);
    28892894
    28902895    return rc;
     
    29042909    int rc = VINF_SUCCESS;
    29052910
    2906     if (pThis->fAsyncIOSupported)
     2911    Assert(cbReqIo > 0);
     2912
     2913    if (   pThis->fAsyncIOSupported
     2914        && !(pIoReq->fFlags & PDMIMEDIAEX_F_SYNC))
    29072915    {
    29082916        if (pThis->pBlkCache)
     
    29472955    int rc = VINF_SUCCESS;
    29482956
    2949     if (pThis->fAsyncIOSupported)
     2957    Assert(cbReqIo > 0);
     2958
     2959    if (   pThis->fAsyncIOSupported
     2960        && !(pIoReq->fFlags & PDMIMEDIAEX_F_SYNC))
    29502961    {
    29512962        if (pThis->pBlkCache)
     
    29882999    int rc = VINF_SUCCESS;
    29893000
    2990     if (pThis->fAsyncIOSupported)
     3001    if (   pThis->fAsyncIOSupported
     3002        && !(pIoReq->fFlags & PDMIMEDIAEX_F_SYNC))
    29913003    {
    29923004        if (pThis->pBlkCache)
     
    30223034    int rc = VINF_SUCCESS;
    30233035
    3024     if (pThis->fAsyncIOSupported)
     3036    if (   pThis->fAsyncIOSupported
     3037        && !(pIoReq->fFlags & PDMIMEDIAEX_F_SYNC))
    30253038    {
    30263039        if (pThis->pBlkCache)
     
    30653078           && rc == VINF_SUCCESS)
    30663079    {
     3080        Assert(pIoReq->ReadWrite.cbIoBuf > 0);
     3081
    30673082        size_t cbReqIo = RT_MIN(pIoReq->ReadWrite.cbReqLeft, pIoReq->ReadWrite.cbIoBuf);
    30683083
     
    31273142                if (rc == VINF_SUCCESS)
    31283143                {
     3144                    Assert(pIoReq->ReadWrite.cbIoBuf > 0);
     3145
    31293146                    ASMAtomicDecU32(&pThis->cIoReqsWaiting);
    31303147                    RTListNodeRemove(&pIoReqCur->NdLstWait);
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