VirtualBox

Changeset 28693 in vbox


Ignore:
Timestamp:
Apr 24, 2010 7:14:43 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60565
Message:

VBoxHDD/Async: Fix diff images

File:
1 edited

Legend:

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

    r28683 r28693  
    744744    PVBOXHDD pDisk = pIoCtx->pDisk;
    745745
     746    LogFlowFunc(("pIoCtx=%#p\n"));
     747
    746748    if (   !pIoCtx->cbTransferLeft
    747         && !pIoCtx->cMetaTransfersPending)
     749        && !pIoCtx->cMetaTransfersPending
     750        && !pIoCtx->pfnIoCtxTransfer)
    748751        return VINF_VD_ASYNC_IO_FINISHED;
    749752
     
    755758               && RT_SUCCESS(rc))
    756759        {
     760            LogFlowFunc(("calling transfer function %#p\n", pIoCtx->pfnIoCtxTransfer));
    757761            rc = pIoCtx->pfnIoCtxTransfer(pIoCtx);
    758762
     
    12291233    PVDIOCTX pIoCtxParent = pIoCtx->pIoCtxParent;
    12301234
     1235    LogFlowFunc(("pIoCtx=%#p\n", pIoCtx));
     1236
    12311237    AssertPtr(pIoCtxParent);
    12321238    Assert(!pIoCtx->cbTransferLeft && !pIoCtx->cMetaTransfersPending);
     
    12891295static int vdWriteHelperOptimizedPreReadAsync(PVDIOCTX pIoCtx)
    12901296{
    1291     pIoCtx->pfnIoCtxTransferNext = vdWriteHelperOptimizedCmpAndWriteAsync;
    1292     return vdReadHelperAsync(pIoCtx);
     1297    int rc = VINF_SUCCESS;
     1298
     1299    LogFlowFunc(("pIoCtx=%#p\n", pIoCtx));
     1300
     1301    if (pIoCtx->cbTransferLeft)
     1302        rc = vdReadHelperAsync(pIoCtx);
     1303
     1304    if (   RT_SUCCESS(rc)
     1305        && (   pIoCtx->cbTransferLeft
     1306            || pIoCtx->cMetaTransfersPending))
     1307        rc = VERR_VD_ASYNC_IO_IN_PROGRESS;
     1308     else
     1309        pIoCtx->pfnIoCtxTransferNext = vdWriteHelperOptimizedCmpAndWriteAsync;
     1310
     1311    return rc;
    12931312}
    12941313
     
    13111330    size_t cbReadImage = 0;
    13121331    int rc;
     1332
     1333    LogFlowFunc(("pIoCtx=%#p\n", pIoCtx));
    13131334
    13141335    AssertPtr(pIoCtx->pIoCtxParent);
     
    14461467                    vdIoCtxFree(pDisk, pIoCtxWrite);
    14471468
    1448                     Assert(RTListIsEmpty(&pDisk->ListWriteGrowing));
    14491469                    rc = VINF_SUCCESS;
    14501470                }
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