Changeset 27476 in vbox for trunk/src/VBox
- Timestamp:
- Mar 18, 2010 11:13:17 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r27232 r27476 579 579 } 580 580 pVmdkFile->fOpen = fOpen; 581 582 #ifndef VBOX_WITH_NEW_IO_CODE 581 583 if ((pImage->uOpenFlags & VD_OPEN_FLAGS_ASYNC_IO) && (fAsyncIO)) 582 584 { … … 596 598 pVmdkFile->fAsyncIO = false; 597 599 } 600 #else 601 rc = pImage->pInterfaceAsyncIOCallbacks->pfnOpen(pImage->pInterfaceAsyncIO->pvUser, 602 pszFilename, 603 pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY 604 ? VD_INTERFACEASYNCIO_OPEN_FLAGS_READONLY 605 : 0, 606 NULL, 607 pImage->pVDIfsDisk, 608 &pVmdkFile->pStorage); 609 #endif 598 610 if (RT_SUCCESS(rc)) 599 611 { … … 645 657 pImage->pFiles = pNext; 646 658 659 #ifndef VBOX_WITH_NEW_IO_CODE 647 660 if (pVmdkFile->fAsyncIO) 648 661 { … … 654 667 rc = RTFileClose(pVmdkFile->File); 655 668 } 669 #else 670 rc = pImage->pInterfaceAsyncIOCallbacks->pfnClose(pImage->pInterfaceAsyncIO->pvUser, 671 pVmdkFile->pStorage); 672 #endif 656 673 if (RT_SUCCESS(rc) && pVmdkFile->fDelete) 657 674 rc = RTFileDelete(pVmdkFile->pszFilename); … … 673 690 PVMDKIMAGE pImage = pVmdkFile->pImage; 674 691 692 #ifndef VBOX_WITH_NEW_IO_CODE 675 693 if (pVmdkFile->fAsyncIO) 676 694 return pImage->pInterfaceAsyncIOCallbacks->pfnReadSync(pImage->pInterfaceAsyncIO->pvUser, … … 679 697 else 680 698 return RTFileReadAt(pVmdkFile->File, uOffset, pvBuf, cbToRead, pcbRead); 699 #else 700 return pImage->pInterfaceAsyncIOCallbacks->pfnReadSync(pImage->pInterfaceAsyncIO->pvUser, 701 pVmdkFile->pStorage, uOffset, 702 cbToRead, pvBuf, pcbRead); 703 #endif 681 704 } 682 705 … … 690 713 PVMDKIMAGE pImage = pVmdkFile->pImage; 691 714 715 #ifndef VBOX_WITH_NEW_IO_CODE 692 716 if (pVmdkFile->fAsyncIO) 693 717 return pImage->pInterfaceAsyncIOCallbacks->pfnWriteSync(pImage->pInterfaceAsyncIO->pvUser, … … 696 720 else 697 721 return RTFileWriteAt(pVmdkFile->File, uOffset, pvBuf, cbToWrite, pcbWritten); 722 #else 723 return pImage->pInterfaceAsyncIOCallbacks->pfnWriteSync(pImage->pInterfaceAsyncIO->pvUser, 724 pVmdkFile->pStorage, uOffset, 725 cbToWrite, pvBuf, pcbWritten); 726 #endif 698 727 } 699 728 … … 705 734 PVMDKIMAGE pImage = pVmdkFile->pImage; 706 735 736 #ifndef VBOX_WITH_NEW_IO_CODE 707 737 if (pVmdkFile->fAsyncIO) 708 738 { … … 713 743 else 714 744 return RTFileGetSize(pVmdkFile->File, pcbSize); 745 #else 746 return pImage->pInterfaceAsyncIOCallbacks->pfnGetSize(pImage->pInterfaceAsyncIO->pvUser, 747 pVmdkFile->pStorage, 748 pcbSize); 749 #endif 715 750 } 716 751 … … 722 757 PVMDKIMAGE pImage = pVmdkFile->pImage; 723 758 759 #ifndef VBOX_WITH_NEW_IO_CODE 724 760 if (pVmdkFile->fAsyncIO) 725 761 { … … 730 766 else 731 767 return RTFileSetSize(pVmdkFile->File, cbSize); 768 #else 769 return pImage->pInterfaceAsyncIOCallbacks->pfnSetSize(pImage->pInterfaceAsyncIO->pvUser, 770 pVmdkFile->pStorage, 771 cbSize); 772 #endif 732 773 } 733 774 … … 739 780 PVMDKIMAGE pImage = pVmdkFile->pImage; 740 781 782 #ifndef VBOX_WITH_NEW_IO_CODE 741 783 if (pVmdkFile->fAsyncIO) 742 784 return pImage->pInterfaceAsyncIOCallbacks->pfnFlushSync(pImage->pInterfaceAsyncIO->pvUser, … … 744 786 else 745 787 return RTFileFlush(pVmdkFile->File); 788 #else 789 return pImage->pInterfaceAsyncIOCallbacks->pfnFlushSync(pImage->pInterfaceAsyncIO->pvUser, 790 pVmdkFile->pStorage); 791 #endif 746 792 } 747 793
Note:
See TracChangeset
for help on using the changeset viewer.