Changeset 27671 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 24, 2010 3:45:38 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r27665 r27671 197 197 VSCSIIOREQTXDIR enmTxDir = VSCSIIoReqTxDirGet(hVScsiIoReq); 198 198 199 LogFlowFunc(("Request hVScsiIoReq=%#p completed\n", hVScsiIoReq)); 200 199 201 if (enmTxDir == VSCSIIOREQTXDIR_READ) 200 202 pThis->pLed->Actual.s.fReading = 0; … … 224 226 VSCSIIOREQTXDIR enmTxDir; 225 227 228 LogFlowFunc(("Enqueuing hVScsiIoReq=%#p\n", hVScsiIoReq)); 229 226 230 enmTxDir = VSCSIIoReqTxDirGet(hVScsiIoReq); 227 231 … … 231 235 { 232 236 /** @todo Flush callback for the async I/O interface. */ 237 ASMAtomicDecU32(&pThis->StatIoDepth); 233 238 VSCSIIoReqCompleted(hVScsiIoReq, VINF_SUCCESS); 234 239 break; … … 255 260 if (RT_FAILURE(rc)) 256 261 AssertMsgFailed(("%s: Failed to read data %Rrc\n", __FUNCTION__, rc)); 257 STAM_REL_COUNTER_ADD(&pThis->StatBytesRead, cb Seg);262 STAM_REL_COUNTER_ADD(&pThis->StatBytesRead, cbTransfer); 258 263 } 259 264 else … … 265 270 if (RT_FAILURE(rc)) 266 271 AssertMsgFailed(("%s: Failed to write data %Rrc\n", __FUNCTION__, rc)); 267 STAM_REL_COUNTER_ADD(&pThis->StatBytesWritten, cbSeg); 272 STAM_REL_COUNTER_ADD(&pThis->StatBytesWritten, cbTransfer); 273 } 274 275 if (rc == VINF_VD_ASYNC_IO_FINISHED) 276 { 277 if (enmTxDir == VSCSIIOREQTXDIR_READ) 278 pThis->pLed->Actual.s.fReading = 0; 279 else if (enmTxDir == VSCSIIOREQTXDIR_WRITE) 280 pThis->pLed->Actual.s.fWriting = 0; 281 else 282 AssertMsgFailed(("Invalid transfer direction %u\n", enmTxDir)); 283 ASMAtomicDecU32(&pThis->StatIoDepth); 284 VSCSIIoReqCompleted(hVScsiIoReq, VINF_SUCCESS); 268 285 } 269 286 -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSIIoReq.cpp
r27653 r27671 43 43 pVScsiIoReq->enmTxDir = VSCSIIOREQTXDIR_FLUSH; 44 44 45 ASMAtomicIncU32(&pVScsiLun->IoReq.cReqOutstanding); 46 45 47 rc = vscsiLunReqTransferEnqueue(pVScsiLun, pVScsiIoReq); 46 if (RT_ SUCCESS(rc))47 ASMAtomicIncU32(&pVScsiLun->IoReq.cReqOutstanding);48 else48 if (RT_FAILURE(rc)) 49 { 50 ASMAtomicDecU32(&pVScsiLun->IoReq.cReqOutstanding); 49 51 RTMemFree(pVScsiIoReq); 52 } 50 53 51 54 return rc; … … 75 78 pVScsiIoReq->cSeg = pVScsiReq->IoMemCtx.cSegments; 76 79 80 ASMAtomicIncU32(&pVScsiLun->IoReq.cReqOutstanding); 81 77 82 rc = vscsiLunReqTransferEnqueue(pVScsiLun, pVScsiIoReq); 78 if (RT_ SUCCESS(rc))79 ASMAtomicIncU32(&pVScsiLun->IoReq.cReqOutstanding);80 else83 if (RT_FAILURE(rc)) 84 { 85 ASMAtomicDecU32(&pVScsiLun->IoReq.cReqOutstanding); 81 86 RTMemFree(pVScsiIoReq); 87 } 82 88 83 89 return rc; … … 99 105 100 106 AssertPtrReturn(pVScsiIoReq, VERR_INVALID_HANDLE); 107 108 LogFlowFunc(("hVScsiIoReq=%#p rcIoReq=%Rrc\n", hVScsiIoReq, rcIoReq)); 101 109 102 110 pVScsiLun = pVScsiIoReq->pVScsiLun;
Note:
See TracChangeset
for help on using the changeset viewer.