Changeset 83587 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Apr 6, 2020 12:31:32 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 136946
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
r83582 r83587 717 717 } 718 718 719 PVIRTIO_DESC_CHAIN_T pDescChain ;719 PVIRTIO_DESC_CHAIN_T pDescChain = NULL; 720 720 int rc = virtioCoreR3QueueGet(pDevIns, &pThis->Virtio, EVENTQ_IDX, &pDescChain, true); 721 721 AssertRCReturn(rc, rc); … … 742 742 virtioCoreR3QueuePut(pDevIns, &pThis->Virtio, EVENTQ_IDX, &ReqSgBuf, pDescChain, true /*fFence*/); 743 743 virtioCoreQueueSync(pDevIns, &pThis->Virtio, EVENTQ_IDX); 744 virtioCoreR3DescChainRelease(pDescChain); 744 745 745 746 return VINF_SUCCESS; … … 751 752 RTMemFree(pReq->pbSense); 752 753 pReq->pbSense = NULL; 754 virtioCoreR3DescChainRelease(pReq->pDescChain); 755 pReq->pDescChain = NULL; 753 756 pTarget->pDrvMediaEx->pfnIoReqFree(pTarget->pDrvMediaEx, pReq->hIoReq); 754 757 } … … 1257 1260 pReq->cbDataOut = cbDataOut; 1258 1261 pReq->pDescChain = pDescChain; 1262 virtioCoreR3DescChainRetain(pDescChain); /* (For pReq->pDescChain. Released by virtioScsiR3FreeReq.) */ 1259 1263 pReq->uDataInOff = offDataIn; 1260 1264 pReq->uDataOutOff = offDataOut; … … 1550 1554 pWorkerR3->auRedoDescs[i], &pDescChain); 1551 1555 if (RT_FAILURE(rc)) 1552 LogRel(("Error fetching desc chain to redo, %Rrc", rc));1556 LogRel(("Error fetching desc chain to redo, %Rrc", rc)); 1553 1557 1554 1558 rc = virtioScsiR3ReqSubmit(pDevIns, pThis, pThisCC, qIdx, pDescChain); 1555 1559 if (RT_FAILURE(rc)) 1556 LogRel(("Error submitting req packet, resetting %Rrc", rc)); 1560 LogRel(("Error submitting req packet, resetting %Rrc", rc)); 1561 1562 virtioCoreR3DescChainRelease(pDescChain); 1557 1563 } 1558 1564 pWorkerR3->cRedoDescs = 0; 1559 1565 1560 1566 Log6Func(("fetching next descriptor chain from %s\n", VIRTQNAME(qIdx))); 1561 PVIRTIO_DESC_CHAIN_T pDescChain ;1567 PVIRTIO_DESC_CHAIN_T pDescChain = NULL; 1562 1568 int rc = virtioCoreR3QueueGet(pDevIns, &pThis->Virtio, qIdx, &pDescChain, true); 1563 1569 if (rc == VERR_NOT_AVAILABLE) 1564 1570 { 1565 Log6Func(("Nothing found in %s\n", VIRTQNAME(qIdx)));1566 continue;1571 Log6Func(("Nothing found in %s\n", VIRTQNAME(qIdx))); 1572 continue; 1567 1573 } 1568 1574 … … 1572 1578 else /* request queue index */ 1573 1579 { 1574 1575 1576 1580 rc = virtioScsiR3ReqSubmit(pDevIns, pThis, pThisCC, qIdx, pDescChain); 1581 if (RT_FAILURE(rc)) 1582 LogRel(("Error submitting req packet, resetting %Rrc", rc)); 1577 1583 } 1584 1585 virtioCoreR3DescChainRelease(pDescChain); 1578 1586 } 1579 1587 }
Note:
See TracChangeset
for help on using the changeset viewer.