Changeset 90814 in vbox
- Timestamp:
- Aug 23, 2021 8:14:15 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VD.cpp
r90813 r90814 9437 9437 int rc; 9438 9438 int rc2; 9439 bool fLockWrite = false;9440 9439 9441 9440 LogFlowFunc(("pDisk=%#p paRanges=%#p cRanges=%u\n", 9442 9441 pDisk, paRanges, cRanges)); 9442 /* sanity check */ 9443 AssertPtrReturn(pDisk, VERR_INVALID_POINTER); 9444 AssertMsg(pDisk->u32Signature == VDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 9445 9446 /* Check arguments. */ 9447 AssertReturn(cRanges > 0, VERR_INVALID_PARAMETER); 9448 AssertPtrReturn(paRanges, VERR_INVALID_POINTER); 9449 9443 9450 do 9444 9451 { 9445 /* sanity check */9446 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);9447 AssertMsg(pDisk->u32Signature == VDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));9448 9449 /* Check arguments. */9450 AssertMsgBreakStmt(cRanges,9451 ("cRanges=%u\n", cRanges),9452 rc = VERR_INVALID_PARAMETER);9453 AssertMsgBreakStmt(VALID_PTR(paRanges),9454 ("paRanges=%#p\n", paRanges),9455 rc = VERR_INVALID_PARAMETER);9456 9457 9452 rc2 = vdThreadStartWrite(pDisk); 9458 9453 AssertRC(rc2); 9459 fLockWrite = true;9460 9454 9461 9455 AssertPtrBreakStmt(pDisk->pLast, rc = VERR_VD_NOT_OPENED); … … 9480 9474 } while (0); 9481 9475 9482 if (RT_UNLIKELY(fLockWrite)) 9483 { 9484 rc2 = vdThreadFinishWrite(pDisk); 9485 AssertRC(rc2); 9486 } 9476 rc2 = vdThreadFinishWrite(pDisk); 9477 AssertRC(rc2); 9487 9478 9488 9479 LogFlowFunc(("returns %Rrc\n", rc)); … … 9498 9489 int rc = VERR_VD_BLOCK_FREE; 9499 9490 int rc2; 9500 bool fLockRead = false;9501 9491 PVDIOCTX pIoCtx = NULL; 9502 9492 … … 9504 9494 pDisk, uOffset, pcSgBuf, cbRead, pvUser1, pvUser2)); 9505 9495 9496 /* sanity check */ 9497 AssertPtrReturn(pDisk, VERR_INVALID_POINTER); 9498 AssertMsg(pDisk->u32Signature == VDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 9499 9500 /* Check arguments. */ 9501 AssertReturn(cbRead > 0, VERR_INVALID_PARAMETER); 9502 AssertPtrReturn(pcSgBuf, VERR_INVALID_POINTER); 9503 9506 9504 do 9507 9505 { 9508 /* sanity check */9509 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);9510 AssertMsg(pDisk->u32Signature == VDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));9511 9512 /* Check arguments. */9513 AssertMsgBreakStmt(cbRead,9514 ("cbRead=%zu\n", cbRead),9515 rc = VERR_INVALID_PARAMETER);9516 AssertMsgBreakStmt(VALID_PTR(pcSgBuf),9517 ("pcSgBuf=%#p\n", pcSgBuf),9518 rc = VERR_INVALID_PARAMETER);9519 9520 9506 rc2 = vdThreadStartRead(pDisk); 9521 9507 AssertRC(rc2); 9522 fLockRead = true;9523 9508 9524 9509 AssertMsgBreakStmt( uOffset < pDisk->cbSize … … 9553 9538 } while (0); 9554 9539 9555 if ( RT_UNLIKELY(fLockRead) && (rc != VERR_VD_ASYNC_IO_IN_PROGRESS))9540 if (rc != VERR_VD_ASYNC_IO_IN_PROGRESS) 9556 9541 { 9557 9542 rc2 = vdThreadFinishRead(pDisk);
Note:
See TracChangeset
for help on using the changeset viewer.