Changeset 36292 in vbox
- Timestamp:
- Mar 16, 2011 12:45:59 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70589
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VD.cpp
r36278 r36292 3475 3475 size_t cbCompleted) 3476 3476 { 3477 PVDIO pVDIo = (PVDIO)pvUser; 3478 PVBOXHDD pDisk = pVDIo->pDisk; 3479 3480 /* 3481 * Grab the disk critical section to avoid races with other threads which 3482 * might still modify the I/O context. 3483 * Example is that iSCSI is doing an asynchronous write but calls us already 3484 * while the other thread is still hanging in vdWriteHelperAsync and couldn't update 3485 * the fBlocked state yet. 3486 * It can overwrite the state to true before we call vdIoCtxContinue and the 3487 * the request would hang indefinite. 3488 */ 3489 int rc = RTCritSectEnter(&pDisk->CritSect); 3490 AssertRC(rc); 3491 3477 3492 /* Continue */ 3478 3493 pIoCtx->fBlocked = false; … … 3483 3498 if (!pIoCtx->cbTransferLeft) 3484 3499 pIoCtx->pfnIoCtxTransfer = NULL; 3500 3501 rc = RTCritSectLeave(&pDisk->CritSect); 3502 AssertRC(rc); 3485 3503 3486 3504 vdIoCtxContinue(pIoCtx, rcReq);
Note:
See TracChangeset
for help on using the changeset viewer.