Changeset 23709 in vbox
- Timestamp:
- Oct 12, 2009 7:11:16 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 53427
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r23151 r23709 569 569 /** Vote for another pass. */ 570 570 #define VINF_SSM_VOTE_FOR_ANOTHER_PASS 1851 571 /** Vote for done tell SSM not to call again until the final pass. */ 572 #define VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN 1852 571 573 /** Vote for giving up. */ 572 #define VERR_SSM_VOTE_FOR_GIVING_UP (-185 2)574 #define VERR_SSM_VOTE_FOR_GIVING_UP (-1853) 573 575 /** Giving up a live snapshot/migration attempt because of too many passes. */ 574 #define VERR_SSM_TOO_MANY_PASSES (-185 3)576 #define VERR_SSM_TOO_MANY_PASSES (-1854) 575 577 /** Giving up a live snapshot/migration attempt because the state grew to 576 578 * big. */ 577 #define VERR_SSM_STATE_GREW_TOO_BIG (-185 4)579 #define VERR_SSM_STATE_GREW_TOO_BIG (-1855) 578 580 /** Giving up a live snapshot attempt because we're low on disk space. */ 579 #define VERR_SSM_LOW_ON_DISK_SPACE (-185 5)581 #define VERR_SSM_LOW_ON_DISK_SPACE (-1856) 580 582 /** The operation was cancelled. */ 581 #define VERR_SSM_CANCELLED (-185 6)583 #define VERR_SSM_CANCELLED (-1857) 582 584 /** Nothing that can be cancelled. */ 583 #define VERR_SSM_NO_PENDING_OPERATION (-185 7)585 #define VERR_SSM_NO_PENDING_OPERATION (-1858) 584 586 /** The operation has already been cancelled. */ 585 #define VERR_SSM_ALREADY_CANCELLED (-185 8)587 #define VERR_SSM_ALREADY_CANCELLED (-1859) 586 588 /** The machine was powered off while saving. */ 587 #define VERR_SSM_LIVE_POWERED_OFF (-18 59)589 #define VERR_SSM_LIVE_POWERED_OFF (-1860) 588 590 /** The live snapshot/migration operation was aborted because of a guru 589 591 * meditation. */ 590 #define VERR_SSM_LIVE_GURU_MEDITATION (-186 0)592 #define VERR_SSM_LIVE_GURU_MEDITATION (-1861) 591 593 /** The live snapshot/migration operation was aborted because of a fatal runtime 592 594 * error. */ 593 #define VERR_SSM_LIVE_FATAL_ERROR (-186 1)595 #define VERR_SSM_LIVE_FATAL_ERROR (-1862) 594 596 /** The VM was suspended while saving, don't resume execution. */ 595 #define VINF_SSM_LIVE_SUSPENDED 186 2597 #define VINF_SSM_LIVE_SUSPENDED 1863 596 598 /** @} */ 597 599 -
trunk/include/VBox/ssm.h
r23598 r23709 170 170 * @retval VINF_SUCCESS if done. 171 171 * @retval VINF_SSM_VOTE_FOR_ANOTHER_PASS if another pass is needed. 172 * @retval VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN if the live saving of the unit is 173 * done and there is not need calling it again before the final pass. 172 174 * @retval VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up. 173 175 * … … 295 297 * @retval VINF_SUCCESS if done. 296 298 * @retval VINF_SSM_VOTE_FOR_ANOTHER_PASS if another pass is needed. 299 * @retval VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN if the live saving of the unit is 300 * done and there is not need calling it again before the final pass. 297 301 * @retval VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up. 298 302 * … … 421 425 * @retval VINF_SUCCESS if done. 422 426 * @retval VINF_SSM_VOTE_FOR_ANOTHER_PASS if another pass is needed. 427 * @retval VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN if the live saving of the unit is 428 * done and there is not need calling it again before the final pass. 423 429 * @retval VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up. 424 430 * … … 541 547 * being called every time. 542 548 * 543 * @returns true if done, false if there is more that needs to be saved first. 549 * @returns VBox status code. 550 * @retval VINF_SUCCESS if done. 551 * @retval VINF_SSM_VOTE_FOR_ANOTHER_PASS if another pass is needed. 552 * @retval VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN if the live saving of the unit is 553 * done and there is not need calling it again before the final pass. 554 * @retval VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up. 555 * 544 556 * @param pSSM SSM operation handle. 545 557 * @param pvUser User argument. -
trunk/src/VBox/VMM/SSM.cpp
r23668 r23709 4260 4260 static int ssmR3LiveDoVoteRun(PVM pVM, PSSMHANDLE pSSM, uint32_t uPass) 4261 4261 { 4262 int rcRet = VINF_SUCCESS; 4262 4263 AssertRC(pSSM->rc); 4263 4264 pSSM->rc = VINF_SUCCESS; … … 4265 4266 for (PSSMUNIT pUnit = pVM->ssm.s.pHead; pUnit; pUnit = pUnit->pNext) 4266 4267 { 4267 if (pUnit->u.Common.pfnLiveVote) 4268 if ( pUnit->u.Common.pfnLiveVote 4269 && !pUnit->fDoneLive) 4268 4270 { 4269 4271 int rc; … … 4293 4295 { 4294 4296 Log(("ssmR3DoLiveVoteRun: '%s'/#%u -> VINF_SSM_VOTE_FOR_ANOTHER_PASS (pass=%u)\n", pUnit->szName, pUnit->u32Instance, uPass)); 4295 r eturnVINF_SSM_VOTE_FOR_ANOTHER_PASS;4297 rcRet = VINF_SSM_VOTE_FOR_ANOTHER_PASS; 4296 4298 } 4297 4298 /* 4299 * rc is usually VERR_SSM_VOTE_FOR_GIVING_UP here, but we allow 4300 * other status codes for better user feed back. However, no 4301 * other non-error status is allowed. 4302 */ 4303 LogRel(("SSM: Error - '%s'/#%u voted %Rrc! (pass=%u)\n", pUnit->szName, pUnit->u32Instance, rc, uPass)); 4304 AssertMsgReturn(RT_FAILURE(rc), ("%Rrc; '%s'\n", rc, pUnit->szName), pSSM->rc = VERR_IPE_UNEXPECTED_INFO_STATUS); 4305 return pSSM->rc = rc; 4299 else if (rc == VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN) 4300 { 4301 pUnit->fDoneLive = true; 4302 Log(("ssmR3DoLiveVoteRun: '%s'/#%u -> VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN (pass=%u)\n", pUnit->szName, pUnit->u32Instance, uPass)); 4303 } 4304 else 4305 { 4306 /* 4307 * rc is usually VERR_SSM_VOTE_FOR_GIVING_UP here, but we allow 4308 * other status codes for better user feed back. However, no 4309 * other non-error status is allowed. 4310 */ 4311 LogRel(("SSM: Error - '%s'/#%u voted %Rrc! (pass=%u)\n", pUnit->szName, pUnit->u32Instance, rc, uPass)); 4312 AssertMsgReturn(RT_FAILURE(rc), ("%Rrc; '%s'\n", rc, pUnit->szName), pSSM->rc = VERR_IPE_UNEXPECTED_INFO_STATUS); 4313 return pSSM->rc = rc; 4314 } 4306 4315 } 4307 4316 } 4308 4317 } 4309 4310 LogRel(("SSM: Step 1 completed after pass %u.\n", uPass));4311 return VINF_SUCCESS;4318 if (rcRet == VINF_SUCCESS) 4319 LogRel(("SSM: Step 1 completed after pass %u.\n", uPass)); 4320 return rcRet; 4312 4321 } 4313 4322 … … 4334 4343 * Skip units without a callback (this is most). 4335 4344 */ 4336 if (!pUnit->u.Common.pfnLiveExec) 4345 if ( !pUnit->u.Common.pfnLiveExec 4346 || pUnit->fDoneLive) 4337 4347 continue; 4338 4348 pUnit->offStream = ssmR3StrmTell(&pSSM->Strm); -
trunk/src/VBox/VMM/SSMInternal.h
r22884 r23709 67 67 * done or not. */ 68 68 bool fCalled; 69 /** Finished its live part. 70 * This is used to handle VERR_SSM_VOTE_FOR_GIVING_UP. */ 71 bool fDoneLive; 69 72 /** Callback interface type. */ 70 73 SSMUNITTYPE enmType;
Note:
See TracChangeset
for help on using the changeset viewer.