Changeset 30044 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Jun 4, 2010 6:59:05 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62398
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
r29497 r30044 269 269 /** Number of bytes to post read. */ 270 270 size_t cbPostRead; 271 /** Number of bytes to write left in the parent. */ 272 size_t cbWriteParent; 271 273 /** Write type dependent data. */ 272 274 union … … 281 283 /** Bytes to read from the image. */ 282 284 size_t cbReadImage; 283 /** Number of bytes to wite left. */284 size_t cbWrite;285 285 } Optimized; 286 286 } Write; … … 643 643 PCRTSGSEG paSeg, unsigned cSeg, 644 644 PVDIOCTX pIoCtxParent, size_t cbTransferParent, 645 void *pvAllocation,645 size_t cbWriteParent, void *pvAllocation, 646 646 PFNVDIOCTXTRANSFER pfnIoCtxTransfer) 647 647 { … … 655 655 pIoCtx->Type.Child.cbTransferLeftSaved = cbTransfer; 656 656 pIoCtx->Type.Child.cbTransferParent = cbTransferParent; 657 pIoCtx->Type.Child.cbWriteParent = cbWriteParent; 657 658 } 658 659 … … 1299 1300 /* Now assemble the remaining data. */ 1300 1301 if (cbWriteCopy) 1301 vdIoCtxCopy(pIoCtx, pIoCtxParent, cbWriteCopy); 1302 { 1303 /* 1304 * The S/G buffer of the parent needs to be cloned because 1305 * it is not allowed to modify the state. 1306 */ 1307 RTSGBUF SgBufParentTmp; 1308 1309 RTSgBufClone(&SgBufParentTmp, &pIoCtxParent->SgBuf); 1310 RTSgBufCopy(&pIoCtx->SgBuf, &SgBufParentTmp, cbWriteCopy); 1311 } 1312 1302 1313 /* Zero out the remainder of this block. Will never be visible, as this 1303 1314 * is beyond the limit of the image. */ … … 1313 1324 rc = pImage->Backend->pfnAsyncWrite(pImage->pvBackendData, 1314 1325 pIoCtx->uOffset - cbPreRead, 1315 cbPreRead + pIoCtx->cbTransferLeft+ cbPostRead,1326 cbPreRead + cbThisWrite + cbPostRead, 1316 1327 pIoCtx, NULL, &cbPreRead, &cbPostRead, 0); 1317 1328 Assert(rc != VERR_VD_BLOCK_FREE); … … 1354 1365 size_t cbPreRead = pIoCtx->Type.Child.cbPreRead; 1355 1366 size_t cbPostRead = pIoCtx->Type.Child.cbPostRead; 1356 size_t cbWrite = pIoCtx->Type.Child. Write.Optimized.cbWrite;1367 size_t cbWrite = pIoCtx->Type.Child.cbWriteParent; 1357 1368 size_t cbFill = 0; 1358 1369 size_t cbWriteCopy = 0; … … 1389 1400 pIoCtx->cbTransferLeft = cbPreRead + cbThisWrite + cbPostRead - cbFill; 1390 1401 pIoCtx->cbTransfer = pIoCtx->cbTransferLeft; 1391 pIoCtx->uOffset -= cbPreRead;1402 pIoCtx->uOffset -= cbPreRead; 1392 1403 1393 1404 /* Next step */ … … 1439 1450 pIoCtx->fBlocked = true; 1440 1451 Assert(pIoCtx->NodeWriteGrowing.pNext == &pDisk->ListWriteGrowing); 1441 Assert(pDisk->ListWriteGrowing.pPrev == & 1452 Assert(pDisk->ListWriteGrowing.pPrev == &pIoCtx->NodeWriteGrowing); 1442 1453 rc = VERR_VD_ASYNC_IO_IN_PROGRESS; 1443 1454 break; … … 1459 1470 pTmp, 1, 1460 1471 pIoCtx, cbThisWrite, 1472 cbWrite, 1461 1473 pTmp, 1462 1474 (pImage->uOpenFlags & VD_OPEN_FLAGS_HONOR_SAME)
Note:
See TracChangeset
for help on using the changeset viewer.