Changeset 26147 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 2, 2010 1:55:20 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57156
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r26001 r26147 353 353 354 354 Assert(!pStorageBackend->fSyncIoPending); 355 pStorageBackend->fSyncIoPending = true;355 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true); 356 356 DataSeg.cbSeg = cbRead; 357 357 DataSeg.pvSeg = pvBuf; … … 361 361 return rc; 362 362 363 /* Wait */ 364 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT); 365 AssertRC(rc); 363 if (rc == VINF_AIO_TASK_PENDING) 364 { 365 /* Wait */ 366 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT); 367 AssertRC(rc); 368 } 369 else 370 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, false); 366 371 367 372 if (pcbRead) … … 380 385 381 386 Assert(!pStorageBackend->fSyncIoPending); 382 pStorageBackend->fSyncIoPending = true;387 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true); 383 388 DataSeg.cbSeg = cbWrite; 384 389 DataSeg.pvSeg = (void *)pvBuf; … … 388 393 return rc; 389 394 390 /* Wait */ 391 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT); 392 AssertRC(rc); 395 if (rc == VINF_AIO_TASK_PENDING) 396 { 397 /* Wait */ 398 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT); 399 AssertRC(rc); 400 } 401 else 402 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, false); 393 403 394 404 if (pcbWritten) … … 405 415 406 416 Assert(!pStorageBackend->fSyncIoPending); 407 pStorageBackend->fSyncIoPending = true;417 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true); 408 418 409 419 int rc = PDMR3AsyncCompletionEpFlush(pStorageBackend->pEndpoint, NULL, &pTask); … … 411 421 return rc; 412 422 413 /* Wait */ 414 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT); 415 AssertRC(rc); 423 if (rc == VINF_AIO_TASK_PENDING) 424 { 425 /* Wait */ 426 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT); 427 AssertRC(rc); 428 } 429 else 430 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, false); 416 431 417 432 return VINF_SUCCESS; … … 1104 1119 break; 1105 1120 } 1106 rc = CFGMR3QueryBoolDef(pCurNode, "UseNewIo", &fUseNewIo, false);1121 rc = CFGMR3QueryBoolDef(pCurNode, "UseNewIo", &fUseNewIo, true); 1107 1122 if (RT_FAILURE(rc)) 1108 1123 { … … 1248 1263 if (rc == VERR_NOT_SUPPORTED) 1249 1264 { 1250 /* Seems async I/O is not supported by the backend, open in normal mode. */1251 1265 pThis->fAsyncIOSupported = false; 1252 1266 uOpenFlags &= ~VD_OPEN_FLAGS_ASYNC_IO;
Note:
See TracChangeset
for help on using the changeset viewer.