Lines Matching defs:pClusterAlloc

1298  * @param   pClusterAlloc    The cluster allocation to rollback.
1300 static int qcowAsyncClusterAllocRollback(PQCOWIMAGE pImage, PVDIOCTX pIoCtx, PQCOWCLUSTERASYNCALLOC pClusterAlloc)
1304 switch (pClusterAlloc->enmAllocState)
1310 rc = vdIfIoIntFileSetSize(pImage->pIfIo, pImage->pStorage, pClusterAlloc->offNextClusterOld);
1311 qcowL2TblCacheEntryRelease(pClusterAlloc->pL2Entry); /* Release L2 cache entry. */
1312 qcowL2TblCacheEntryFree(pImage, pClusterAlloc->pL2Entry); /* Free it, it is not in the cache yet. */
1318 rc = vdIfIoIntFileSetSize(pImage->pIfIo, pImage->pStorage, pClusterAlloc->offNextClusterOld);
1319 qcowL2TblCacheEntryRelease(pClusterAlloc->pL2Entry); /* Release L2 cache entry. */
1323 AssertMsgFailed(("Invalid cluster allocation state %d\n", pClusterAlloc->enmAllocState));
1327 RTMemFree(pClusterAlloc);
1344 PQCOWCLUSTERASYNCALLOC pClusterAlloc = (PQCOWCLUSTERASYNCALLOC)pvUser;
1347 return qcowAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1349 AssertPtr(pClusterAlloc->pL2Entry);
1351 switch (pClusterAlloc->enmAllocState)
1355 uint64_t offUpdateLe = RT_H2BE_U64(pClusterAlloc->pL2Entry->offL2Tbl);
1358 pClusterAlloc->enmAllocState = QCOWCLUSTERASYNCALLOCSTATE_L2_LINK;
1360 pImage->offL1Table + pClusterAlloc->idxL1*sizeof(uint64_t),
1362 qcowAsyncClusterAllocUpdate, pClusterAlloc);
1368 qcowAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1379 pImage->paL1Table[pClusterAlloc->idxL1] = pClusterAlloc->pL2Entry->offL2Tbl;
1380 qcowL2TblCacheEntryInsert(pImage, pClusterAlloc->pL2Entry);
1382 pClusterAlloc->enmAllocState = QCOWCLUSTERASYNCALLOCSTATE_USER_ALLOC;
1383 pClusterAlloc->offNextClusterOld = offData;
1384 pClusterAlloc->offClusterNew = offData;
1388 offData, pIoCtx, pClusterAlloc->cbToWrite,
1389 qcowAsyncClusterAllocUpdate, pClusterAlloc);
1394 qcowAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1395 RTMemFree(pClusterAlloc);
1401 uint64_t offUpdateLe = RT_H2BE_U64(pClusterAlloc->offClusterNew);
1403 pClusterAlloc->enmAllocState = QCOWCLUSTERASYNCALLOCSTATE_USER_LINK;
1407 pImage->paL1Table[pClusterAlloc->idxL1] + pClusterAlloc->idxL2*sizeof(uint64_t),
1409 qcowAsyncClusterAllocUpdate, pClusterAlloc);
1414 qcowAsyncClusterAllocRollback(pImage, pIoCtx, pClusterAlloc);
1415 RTMemFree(pClusterAlloc);
1422 pClusterAlloc->pL2Entry->paL2Tbl[pClusterAlloc->idxL2] = pClusterAlloc->offClusterNew;
1423 qcowL2TblCacheEntryRelease(pClusterAlloc->pL2Entry);
1424 RTMemFree(pClusterAlloc);
1430 pClusterAlloc->enmAllocState));