VirtualBox

忽略:
時間撮記:
2009-12-2 下午01:42:32 (15 年 以前)
作者:
vboxsync
訊息:

AsyncCompletion/Cache: Complete all pending writes before completing a flush

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp

    r24443 r25147  
    850850                            PPDMASYNCCOMPLETIONENDPOINT pEndpoint)
    851851{
     852    int rc = VINF_SUCCESS;
    852853    PPDMASYNCCOMPLETIONENDPOINTFILE pEpFile = (PPDMASYNCCOMPLETIONENDPOINTFILE)pEndpoint;
    853854    PPDMASYNCCOMPLETIONTASKFILE pTaskFile = (PPDMASYNCCOMPLETIONTASKFILE)pTask;
     
    858859    pTaskFile->cbTransferLeft = 0;
    859860
    860     PPDMACTASKFILE pIoTask = pdmacFileTaskAlloc(pEpFile);
    861     AssertPtr(pIoTask);
    862 
    863     pIoTask->pEndpoint       = pEpFile;
    864     pIoTask->enmTransferType = PDMACTASKFILETRANSFER_FLUSH;
    865     pIoTask->pvUser          = pTaskFile;
    866     pIoTask->pfnCompleted    = pdmacFileEpTaskCompleted;
    867     pdmacFileEpAddTask(pEpFile, pIoTask);
    868 
    869     return VINF_SUCCESS;
     861    if (pEpFile->fCaching)
     862        rc = pdmacFileEpCacheFlush(pEpFile, pTaskFile);
     863    else
     864    {
     865        PPDMACTASKFILE pIoTask = pdmacFileTaskAlloc(pEpFile);
     866        AssertPtr(pIoTask);
     867
     868        pIoTask->pEndpoint       = pEpFile;
     869        pIoTask->enmTransferType = PDMACTASKFILETRANSFER_FLUSH;
     870        pIoTask->pvUser          = pTaskFile;
     871        pIoTask->pfnCompleted    = pdmacFileEpTaskCompleted;
     872        pdmacFileEpAddTask(pEpFile, pIoTask);
     873    }
     874
     875    return rc;
    870876}
    871877
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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