VirtualBox

Changeset 104556 in vbox


Ignore:
Timestamp:
May 8, 2024 1:32:45 PM (9 months ago)
Author:
vboxsync
Message:

src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp: Simplify pdmacFileAioMgrNormalReqsEnqueue() a bit as it would only ever return VINF_SUCCESS and therefore can be converted to return nothing, bugref:3409

File:
1 edited

Legend:

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

    r99739 r104556  
    557557 * Wrapper around RTFIleAioCtxSubmit() which is also doing error handling.
    558558 */
    559 static int pdmacFileAioMgrNormalReqsEnqueue(PPDMACEPFILEMGR pAioMgr,
    560                                             PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint,
    561                                             PRTFILEAIOREQ pahReqs, unsigned cReqs)
     559static void pdmacFileAioMgrNormalReqsEnqueue(PPDMACEPFILEMGR pAioMgr,
     560                                             PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint,
     561                                             PRTFILEAIOREQ pahReqs, unsigned cReqs)
    562562{
    563563    pAioMgr->cRequestsActive += cReqs;
     
    621621                {
    622622                    /* We call ourself again to do any error handling which might come up now. */
    623                     rc = pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &pahReqs[i], 1);
    624                     AssertRC(rc);
     623                    pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &pahReqs[i], 1);
    625624                }
    626625                else if (rcReq != VERR_FILE_AIO_IN_PROGRESS)
     
    646645        }
    647646    }
    648 
    649     return VINF_SUCCESS;
    650647}
    651648
     
    10991096        if (cRequests == RT_ELEMENTS(apReqs))
    11001097        {
    1101             rc = pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, apReqs, cRequests);
     1098            pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, apReqs, cRequests);
    11021099            cRequests = 0;
    1103             AssertMsg(RT_SUCCESS(rc) || (rc == VERR_FILE_AIO_INSUFFICIENT_RESSOURCES),
    1104                       ("Unexpected return code\n"));
    11051100        }
    11061101    }
    11071102
    11081103    if (cRequests)
    1109     {
    1110         rc = pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, apReqs, cRequests);
    1111         AssertMsg(RT_SUCCESS(rc) || (rc == VERR_FILE_AIO_INSUFFICIENT_RESSOURCES),
    1112                   ("Unexpected return code rc=%Rrc\n", rc));
    1113     }
     1104        pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, apReqs, cRequests);
    11141105
    11151106    if (pTaskHead)
     
    15211512
    15221513                pTask->hReq = hReq;
    1523                 rc = pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &hReq, 1);
    1524                 AssertMsg(RT_SUCCESS(rc) || (rc == VERR_FILE_AIO_INSUFFICIENT_RESSOURCES),
    1525                           ("Unexpected return code rc=%Rrc\n", rc));
     1514                pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &hReq, 1);
    15261515            }
    15271516            else if (pTask->fPrefetch)
     
    15521541                AssertRC(rc);
    15531542                pTask->hReq = hReq;
    1554                 rc = pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &hReq, 1);
    1555                 AssertMsg(RT_SUCCESS(rc) || (rc == VERR_FILE_AIO_INSUFFICIENT_RESSOURCES),
    1556                           ("Unexpected return code rc=%Rrc\n", rc));
     1543                pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &hReq, 1);
    15571544            }
    15581545            else
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