Changeset 62746 in vbox for trunk/src/VBox/Storage/QED.cpp
- Timestamp:
- Jul 30, 2016 3:59:55 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/QED.cpp
r62482 r62746 454 454 { 455 455 PQEDL2CACHEENTRY pL2Entry = NULL; 456 int rc = VINF_SUCCESS;457 456 458 457 if (pImage->cbL2Cache + pImage->cbTable <= QED_L2_CACHE_MEMORY_MAX) … … 1319 1318 unsigned uPercentStart, unsigned uPercentSpan) 1320 1319 { 1320 RT_NOREF1(pszComment); 1321 1321 int rc; 1322 1322 int32_t fOpen; … … 1398 1398 static int qedAsyncClusterAllocRollback(PQEDIMAGE pImage, PVDIOCTX pIoCtx, PQEDCLUSTERASYNCALLOC pClusterAlloc) 1399 1399 { 1400 RT_NOREF1(pIoCtx); 1400 1401 int rc = VINF_SUCCESS; 1401 1402 … … 1537 1538 PVDINTERFACE pVDIfsImage, VDTYPE *penmType) 1538 1539 { 1540 RT_NOREF1(pVDIfsDisk); 1539 1541 LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage)); 1540 1542 PVDIOSTORAGE pStorage = NULL; … … 1561 1563 &pStorage); 1562 1564 if (RT_SUCCESS(rc)) 1565 { 1563 1566 rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile); 1564 1565 if ( RT_SUCCESS(rc)1566 && cbFile > sizeof(QedHeader))1567 {1568 QedHeader Header;1569 1570 rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));1571 1567 if ( RT_SUCCESS(rc) 1572 && qedHdrConvertToHostEndianess(&Header)) 1573 { 1574 *penmType = VDTYPE_HDD; 1575 rc = VINF_SUCCESS; 1568 && cbFile > sizeof(QedHeader)) 1569 { 1570 QedHeader Header; 1571 1572 rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header)); 1573 if ( RT_SUCCESS(rc) 1574 && qedHdrConvertToHostEndianess(&Header)) 1575 { 1576 *penmType = VDTYPE_HDD; 1577 rc = VINF_SUCCESS; 1578 } 1579 else 1580 rc = VERR_VD_GEN_INVALID_HEADER; 1576 1581 } 1577 1582 else 1578 1583 rc = VERR_VD_GEN_INVALID_HEADER; 1579 1584 } 1580 else1581 rc = VERR_VD_GEN_INVALID_HEADER;1582 1585 1583 1586 if (pStorage) … … 1648 1651 void **ppBackendData) 1649 1652 { 1653 RT_NOREF1(pUuid); 1650 1654 LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%d ppBackendData=%#p", 1651 1655 pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData)); … … 1896 1900 do 1897 1901 { 1898 uint64_t idxUpdateLe = 0;1899 1900 1902 /* Check if we have to allocate a new cluster for L2 tables. */ 1901 1903 if (!pImage->paL1Table[idxL1]) … … 2283 2285 size_t cbComment) 2284 2286 { 2287 RT_NOREF2(pszComment, cbComment); 2285 2288 LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment)); 2286 2289 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2301 2304 static DECLCALLBACK(int) qedSetComment(void *pBackendData, const char *pszComment) 2302 2305 { 2306 RT_NOREF1(pszComment); 2303 2307 LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment)); 2304 2308 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2324 2328 static DECLCALLBACK(int) qedGetUuid(void *pBackendData, PRTUUID pUuid) 2325 2329 { 2330 RT_NOREF1(pUuid); 2326 2331 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2327 2332 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2342 2347 static DECLCALLBACK(int) qedSetUuid(void *pBackendData, PCRTUUID pUuid) 2343 2348 { 2349 RT_NOREF1(pUuid); 2344 2350 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2345 2351 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2366 2372 static DECLCALLBACK(int) qedGetModificationUuid(void *pBackendData, PRTUUID pUuid) 2367 2373 { 2374 RT_NOREF1(pUuid); 2368 2375 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2369 2376 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2384 2391 static DECLCALLBACK(int) qedSetModificationUuid(void *pBackendData, PCRTUUID pUuid) 2385 2392 { 2393 RT_NOREF1(pUuid); 2386 2394 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2387 2395 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2407 2415 static DECLCALLBACK(int) qedGetParentUuid(void *pBackendData, PRTUUID pUuid) 2408 2416 { 2417 RT_NOREF1(pUuid); 2409 2418 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2410 2419 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2425 2434 static DECLCALLBACK(int) qedSetParentUuid(void *pBackendData, PCRTUUID pUuid) 2426 2435 { 2436 RT_NOREF1(pUuid); 2427 2437 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2428 2438 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2448 2458 static DECLCALLBACK(int) qedGetParentModificationUuid(void *pBackendData, PRTUUID pUuid) 2449 2459 { 2460 RT_NOREF1(pUuid); 2450 2461 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2451 2462 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2466 2477 static DECLCALLBACK(int) qedSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid) 2467 2478 { 2479 RT_NOREF1(pUuid); 2468 2480 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2469 2481 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; … … 2577 2589 PVDINTERFACE pVDIfsOperation) 2578 2590 { 2591 RT_NOREF7(pPCHSGeometry, pLCHSGeometry, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation); 2579 2592 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2580 2593 int rc = VINF_SUCCESS; 2581 2582 PVDINTERFACEPROGRESS pIfProgress = VDIfProgressGet(pVDIfsOperation);2583 2594 2584 2595 /* Making the image smaller is not supported at the moment. */
Note:
See TracChangeset
for help on using the changeset viewer.