Lines Matching defs:pClusterAlloc

1391  * @param   pClusterAlloc    The cluster allocation to rollback.
1393 static int qedAsyncClusterAllocRollback(PQEDIMAGE pImage, PVDIOCTX pIoCtx, PQEDCLUSTERASYNCALLOC pClusterAlloc)
1397 switch (pClusterAlloc->enmAllocState)
1403 rc = vdIfIoIntFileSetSize(pImage->pIfIo, pImage->pStorage, pClusterAlloc->cbImageOld);
1404 qedL2TblCacheEntryRelease(pClusterAlloc->pL2Entry); /* Release L2 cache entry. */
1405 qedL2TblCacheEntryFree(pImage, pClusterAlloc->pL2Entry); /* Free it, it is not in the cache yet. */
1412 rc = vdIfIoIntFileSetSize(pImage->pIfIo, pImage->pStorage, pClusterAlloc->cbImageOld);
1413 qedL2TblCacheEntryRelease(pClusterAlloc->pL2Entry); /* Release L2 cache entry. */
1417 AssertMsgFailed(("Invalid cluster allocation state %d\n", pClusterAlloc->enmAllocState));
1421 RTMemFree(pClusterAlloc);
1438 PQEDCLUSTERASYNCALLOC pClusterAlloc = (PQEDCLUSTERASYNCALLOC)pvUser;
1441 return qedAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1443 AssertPtr(pClusterAlloc->pL2Entry);
1445 switch (pClusterAlloc->enmAllocState)
1449 uint64_t offUpdateLe = RT_H2LE_U64(pClusterAlloc->pL2Entry->offL2Tbl);
1452 pClusterAlloc->enmAllocState = QEDCLUSTERASYNCALLOCSTATE_L2_LINK;
1454 pImage->offL1Table + pClusterAlloc->idxL1*sizeof(uint64_t),
1456 qedAsyncClusterAllocUpdate, pClusterAlloc);
1462 qedAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1473 pImage->paL1Table[pClusterAlloc->idxL1] = pClusterAlloc->pL2Entry->offL2Tbl;
1474 qedL2TblCacheEntryInsert(pImage, pClusterAlloc->pL2Entry);
1476 pClusterAlloc->enmAllocState = QEDCLUSTERASYNCALLOCSTATE_USER_ALLOC;
1477 pClusterAlloc->cbImageOld = offData;
1478 pClusterAlloc->offClusterNew = offData;
1482 offData, pIoCtx, pClusterAlloc->cbToWrite,
1483 qedAsyncClusterAllocUpdate, pClusterAlloc);
1488 qedAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1489 RTMemFree(pClusterAlloc);
1495 uint64_t offUpdateLe = RT_H2LE_U64(pClusterAlloc->offClusterNew);
1497 pClusterAlloc->enmAllocState = QEDCLUSTERASYNCALLOCSTATE_USER_LINK;
1501 pImage->paL1Table[pClusterAlloc->idxL1] + pClusterAlloc->idxL2*sizeof(uint64_t),
1503 qedAsyncClusterAllocUpdate, pClusterAlloc);
1508 qedAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1509 RTMemFree(pClusterAlloc);
1516 pClusterAlloc->pL2Entry->paL2Tbl[pClusterAlloc->idxL2] = pClusterAlloc->offClusterNew;
1517 qedL2TblCacheEntryRelease(pClusterAlloc->pL2Entry);
1518 RTMemFree(pClusterAlloc);
1524 pClusterAlloc->enmAllocState));