儲存庫 vbox 的更動 62738
- 時間撮記:
- 2016-7-30 下午12:23:55 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Storage/VD.cpp
r62482 r62738 302 302 do \ 303 303 { \ 304 AssertMsg(a_pDisk->fLocked, \ 304 NOREF(a_pDisk); \ 305 AssertMsg((a_pDisk)->fLocked, \ 305 306 ("Lock not held\n"));\ 306 307 } while(0) … … 1279 1280 1280 1281 PVDDISCARDBLOCK pBlockRemove = (PVDDISCARDBLOCK)RTAvlrU64RangeRemove(pDiscard->pTreeBlocks, pBlock->Core.Key); 1281 Assert(pBlockRemove == pBlock); 1282 Assert(pBlockRemove == pBlock); NOREF(pBlockRemove); 1282 1283 RTListNodeRemove(&pBlock->NodeLru); 1283 1284 … … 1951 1952 static void vdIoCtxUnlockDisk(PVBOXHDD pDisk, PVDIOCTX pIoCtx, bool fProcessBlockedReqs) 1952 1953 { 1954 RT_NOREF1(pIoCtx); 1953 1955 LogFlowFunc(("pDisk=%#p pIoCtx=%#p fProcessBlockedReqs=%RTbool\n", 1954 1956 pDisk, pIoCtx, fProcessBlockedReqs)); … … 1975 1977 uint64_t uOffset, size_t cbRead, PVDIOCTX pIoCtx, size_t *pcbThisRead) 1976 1978 { 1979 RT_NOREF1(pDisk); 1977 1980 int rc = VINF_SUCCESS; 1978 1981 size_t cbThisRead = cbRead; … … 2526 2529 { 2527 2530 int rc = VINF_SUCCESS; 2528 PVBOXHDD pDisk = pIoCtx->pDisk;2529 2531 PVDIMAGE pImage = pIoCtx->Req.Io.pImageCur; 2530 2532 … … 2619 2621 { 2620 2622 int rc = VINF_SUCCESS; 2621 PVDIMAGE pImage = pIoCtx->Req.Io.pImageCur;2622 2623 size_t cbThisWrite = 0; 2623 2624 size_t cbPreRead = pIoCtx->Type.Child.cbPreRead; … … 3204 3205 { 3205 3206 PVDDISCARDBLOCK pBlockRemove = (PVDDISCARDBLOCK)RTAvlrU64RangeRemove(pDiscard->pTreeBlocks, pBlock->Core.Key); 3206 Assert(pBlockRemove == pBlock); 3207 Assert(pBlockRemove == pBlock); RT_NOREF1(pBlockRemove); 3207 3208 3208 3209 pDiscard->cbDiscarding -= pBlock->cbDiscard; … … 3292 3293 3293 3294 PVDDISCARDBLOCK pBlockRemove = (PVDDISCARDBLOCK)RTAvlrU64RangeRemove(pDiscard->pTreeBlocks, pBlock->Core.Key); 3294 Assert(pBlockRemove == pBlock); 3295 Assert(pBlockRemove == pBlock); NOREF(pBlockRemove); 3295 3296 RTListNodeRemove(&pBlock->NodeLru); 3296 3297 … … 3344 3345 pBlock->pbmAllocated = pbmAllocated; 3345 3346 bool fInserted = RTAvlrU64Insert(pDiscard->pTreeBlocks, &pBlock->Core); 3346 Assert(fInserted); 3347 Assert(fInserted); NOREF(fInserted); 3347 3348 3348 3349 RTListPrepend(&pDiscard->ListLru, &pBlock->NodeLru); … … 3714 3715 return rc; 3715 3716 #else 3717 RT_NOREF1(pszFilename); 3716 3718 return VERR_NOT_IMPLEMENTED; 3717 3719 #endif … … 3799 3801 return rc; 3800 3802 #else 3803 RT_NOREF1(pszPath); 3801 3804 return VERR_NOT_IMPLEMENTED; 3802 3805 #endif … … 3806 3809 * internal: scans plugin directory and loads found plugins. 3807 3810 */ 3808 static int vdLoadDynamicBackends( )3811 static int vdLoadDynamicBackends(void) 3809 3812 { 3810 3813 #ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS … … 3835 3838 return vdRemovePlugin(pszFilename); 3836 3839 #else 3840 RT_NOREF1(pszFilename); 3837 3841 return VERR_NOT_IMPLEMENTED; 3838 3842 #endif … … 3919 3923 return rc; 3920 3924 #else 3925 RT_NOREF1(pszPath); 3921 3926 return VERR_NOT_IMPLEMENTED; 3922 3927 #endif … … 3930 3935 void **ppStorage) 3931 3936 { 3937 RT_NOREF1(pvUser); 3932 3938 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)RTMemAllocZ(sizeof(VDIIOFALLBACKSTORAGE)); 3933 3939 … … 3954 3960 static DECLCALLBACK(int) vdIOCloseFallback(void *pvUser, void *pvStorage) 3955 3961 { 3962 RT_NOREF1(pvUser); 3956 3963 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage; 3957 3964 … … 3963 3970 static DECLCALLBACK(int) vdIODeleteFallback(void *pvUser, const char *pcszFilename) 3964 3971 { 3972 RT_NOREF1(pvUser); 3965 3973 return RTFileDelete(pcszFilename); 3966 3974 } … … 3968 3976 static DECLCALLBACK(int) vdIOMoveFallback(void *pvUser, const char *pcszSrc, const char *pcszDst, unsigned fMove) 3969 3977 { 3978 RT_NOREF1(pvUser); 3970 3979 return RTFileMove(pcszSrc, pcszDst, fMove); 3971 3980 } … … 3973 3982 static DECLCALLBACK(int) vdIOGetFreeSpaceFallback(void *pvUser, const char *pcszFilename, int64_t *pcbFreeSpace) 3974 3983 { 3984 RT_NOREF1(pvUser); 3975 3985 return RTFsQuerySizes(pcszFilename, NULL, pcbFreeSpace, NULL, NULL); 3976 3986 } … … 3978 3988 static DECLCALLBACK(int) vdIOGetModificationTimeFallback(void *pvUser, const char *pcszFilename, PRTTIMESPEC pModificationTime) 3979 3989 { 3990 RT_NOREF1(pvUser); 3980 3991 RTFSOBJINFO info; 3981 3992 int rc = RTPathQueryInfo(pcszFilename, &info, RTFSOBJATTRADD_NOTHING); … … 3990 4001 static DECLCALLBACK(int) vdIOGetSizeFallback(void *pvUser, void *pvStorage, uint64_t *pcbSize) 3991 4002 { 4003 RT_NOREF1(pvUser); 3992 4004 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage; 3993 4005 … … 4000 4012 static DECLCALLBACK(int) vdIOSetSizeFallback(void *pvUser, void *pvStorage, uint64_t cbSize) 4001 4013 { 4014 RT_NOREF1(pvUser); 4002 4015 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage; 4003 4016 … … 4011 4024 uint32_t fFlags) 4012 4025 { 4026 RT_NOREF2(pvUser, fFlags); 4013 4027 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage; 4014 4028 … … 4020 4034 */ 4021 4035 static DECLCALLBACK(int) vdIOWriteSyncFallback(void *pvUser, void *pvStorage, uint64_t uOffset, 4022 const void *pvBuf, size_t cbWrite, size_t *pcbWritten) 4023 { 4036 const void *pvBuf, size_t cbWrite, size_t *pcbWritten) 4037 { 4038 RT_NOREF1(pvUser); 4024 4039 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage; 4025 4040 … … 4031 4046 */ 4032 4047 static DECLCALLBACK(int) vdIOReadSyncFallback(void *pvUser, void *pvStorage, uint64_t uOffset, 4033 void *pvBuf, size_t cbRead, size_t *pcbRead) 4034 { 4048 void *pvBuf, size_t cbRead, size_t *pcbRead) 4049 { 4050 RT_NOREF1(pvUser); 4035 4051 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage; 4036 4052 … … 4043 4059 static DECLCALLBACK(int) vdIOFlushSyncFallback(void *pvUser, void *pvStorage) 4044 4060 { 4061 RT_NOREF1(pvUser); 4045 4062 PVDIIOFALLBACKSTORAGE pStorage = (PVDIIOFALLBACKSTORAGE)pvStorage; 4046 4063 … … 4056 4073 void **ppTask) 4057 4074 { 4075 RT_NOREF8(pvUser, pStorage, uOffset, paSegments, cSegments, cbRead, pvCompletion, ppTask); 4058 4076 return VERR_NOT_IMPLEMENTED; 4059 4077 } … … 4067 4085 void **ppTask) 4068 4086 { 4087 RT_NOREF8(pvUser, pStorage, uOffset, paSegments, cSegments, cbWrite, pvCompletion, ppTask); 4069 4088 return VERR_NOT_IMPLEMENTED; 4070 4089 } … … 4076 4095 void *pvCompletion, void **ppTask) 4077 4096 { 4097 RT_NOREF4(pvUser, pStorage, pvCompletion, ppTask); 4078 4098 return VERR_NOT_IMPLEMENTED; 4079 4099 } … … 4185 4205 { 4186 4206 int rc = VINF_SUCCESS; 4187 bool fIoCtxContinue = true;4188 4207 PVBOXHDD pDisk = pIoCtx->pDisk; 4189 4208 … … 4266 4285 LogFlow(("Removing meta xfer=%#p\n", pMetaXfer)); 4267 4286 bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL; 4268 Assert(fRemoved); 4287 Assert(fRemoved); NOREF(fRemoved); 4269 4288 /* If this was a write check if there is a shadow buffer with updated data. */ 4270 4289 if (pMetaXfer->pbDataShw) … … 4346 4365 LogFlow(("Removing meta xfer=%#p\n", pMetaXfer)); 4347 4366 bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL; 4348 Assert(fRemoved); 4367 Assert(fRemoved); NOREF(fRemoved); 4349 4368 RTMemFree(pMetaXfer); 4350 4369 } … … 4572 4591 static DECLCALLBACK(int) vdIOIntTreeMetaXferDestroy(PAVLRFOFFNODECORE pNode, void *pvUser) 4573 4592 { 4593 RT_NOREF2(pNode, pvUser); 4574 4594 AssertMsgFailed(("Tree should be empty at this point!\n")); 4575 4595 return VINF_SUCCESS; … … 4966 4986 { 4967 4987 bool fInserted = RTAvlrFileOffsetInsert(pIoStorage->pTreeMetaXfers, &pMetaXfer->Core); 4968 Assert(fInserted); 4988 Assert(fInserted); NOREF(fInserted); 4969 4989 } 4970 4990 else … … 5097 5117 LogFlow(("Removing meta xfer=%#p\n", pMetaXfer)); 5098 5118 bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL; 5099 AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n")); 5119 AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n")); NOREF(fRemoved); 5100 5120 RTMemFree(pMetaXfer); 5101 5121 pMetaXfer = NULL; … … 5113 5133 { 5114 5134 bool fInserted = RTAvlrFileOffsetInsert(pIoStorage->pTreeMetaXfers, &pMetaXfer->Core); 5115 Assert(fInserted); 5135 Assert(fInserted); NOREF(fInserted); 5116 5136 } 5117 5137 … … 5203 5223 LogFlow(("Removing meta xfer=%#p\n", pMetaXfer)); 5204 5224 bool fRemoved = RTAvlrFileOffsetRemove(pIoStorage->pTreeMetaXfers, pMetaXfer->Core.Key) != NULL; 5205 AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n")); 5225 AssertMsg(fRemoved, ("Metadata transfer wasn't removed\n")); NOREF(fRemoved); 5206 5226 5207 5227 RTMemFree(pMetaXfer); … … 5359 5379 if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC)) 5360 5380 VD_IS_LOCKED(pDisk); 5381 #else 5382 NOREF(pDisk); 5361 5383 #endif 5362 5384 … … 5425 5447 static DECLCALLBACK(size_t) vdIOIntIoCtxGetDataUnitSize(void *pvUser, PVDIOCTX pIoCtx) 5426 5448 { 5449 RT_NOREF1(pIoCtx); 5427 5450 PVDIO pVDIo = (PVDIO)pvUser; 5428 5451 PVBOXHDD pDisk = pVDIo->pDisk; … … 5726 5749 static DECLCALLBACK(void) vdIoCtxSyncComplete(void *pvUser1, void *pvUser2, int rcReq) 5727 5750 { 5728 PVBOXHDD pDisk = (PVBOXHDD)pvUser1;5751 RT_NOREF2(pvUser1, rcReq); 5729 5752 RTSEMEVENT hEvent = (RTSEMEVENT)pvUser2; 5730 5753 … … 5760 5783 VBOXDDU_DECL(int) VDShutdown(void) 5761 5784 { 5762 PCVBOXHDDBACKEND *pBackends = g_apBackends;5763 PCVDCACHEBACKEND *pCacheBackends = g_apCacheBackends;5764 unsigned cBackends = g_cBackends;5765 5766 5785 if (!g_apBackends) 5767 5786 return VERR_INTERNAL_ERROR;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器