Changeset 31573 in vbox for trunk/src/VBox
- Timestamp:
- Aug 11, 2010 2:42:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
r31504 r31573 973 973 } 974 974 975 if (RT_SUCCESS(rc)) 976 { 977 ASMAtomicSubU32(&pIoCtx->cbTransferLeft, cbThisRead); 978 } 979 else if (rc == VERR_VD_BLOCK_FREE) 975 /* The task state will be updated on success already, don't do it here!. */ 976 if (rc == VERR_VD_BLOCK_FREE) 980 977 { 981 978 /* No image in the chain contains the data for the block. */ … … 2758 2755 PVDIMAGE pImage = (PVDIMAGE)pvUser; 2759 2756 PVBOXHDD pDisk = pImage->pDisk; 2757 size_t cbCopied = 0; 2760 2758 2761 2759 VD_THREAD_IS_CRITSECT_OWNER(pDisk); 2762 2760 2763 return vdIoCtxCopyTo(pIoCtx, (uint8_t *)pvBuf, cbBuf); 2761 cbCopied = vdIoCtxCopyTo(pIoCtx, (uint8_t *)pvBuf, cbBuf); 2762 Assert(cbCopied == cbBuf); 2763 2764 ASMAtomicSubU32(&pIoCtx->cbTransferLeft, cbCopied); 2765 2766 return cbCopied; 2764 2767 } 2765 2768 … … 2769 2772 PVDIMAGE pImage = (PVDIMAGE)pvUser; 2770 2773 PVBOXHDD pDisk = pImage->pDisk; 2774 size_t cbCopied = 0; 2771 2775 2772 2776 VD_THREAD_IS_CRITSECT_OWNER(pDisk); 2773 2777 2774 return vdIoCtxCopyFrom(pIoCtx, (uint8_t *)pvBuf, cbBuf); 2778 cbCopied = vdIoCtxCopyFrom(pIoCtx, (uint8_t *)pvBuf, cbBuf); 2779 Assert(cbCopied == cbBuf); 2780 2781 ASMAtomicSubU32(&pIoCtx->cbTransferLeft, cbCopied); 2782 2783 return cbCopied; 2775 2784 } 2776 2785 … … 2780 2789 PVDIMAGE pImage = (PVDIMAGE)pvUser; 2781 2790 PVBOXHDD pDisk = pImage->pDisk; 2791 size_t cbSet = 0; 2782 2792 2783 2793 VD_THREAD_IS_CRITSECT_OWNER(pDisk); 2784 2794 2785 return vdIoCtxSet(pIoCtx, ch, cb); 2795 cbSet = vdIoCtxSet(pIoCtx, ch, cb); 2796 Assert(cbSet == cb); 2797 2798 ASMAtomicSubU32(&pIoCtx->cbTransferLeft, cbSet); 2799 2800 return cbSet; 2786 2801 } 2787 2802
Note:
See TracChangeset
for help on using the changeset viewer.