VirtualBox

Changeset 23709 in vbox


Ignore:
Timestamp:
Oct 12, 2009 7:11:16 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53427
Message:

SSM: VINF_SSM_VOTE_FOR_ANOTHER_PASS - for pushing config data in pass 0.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r23151 r23709  
    569569/** Vote for another pass.  */
    570570#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
    571573/** Vote for giving up.  */
    572 #define VERR_SSM_VOTE_FOR_GIVING_UP             (-1852)
     574#define VERR_SSM_VOTE_FOR_GIVING_UP             (-1853)
    573575/** Giving up a live snapshot/migration attempt because of too many passes. */
    574 #define VERR_SSM_TOO_MANY_PASSES                (-1853)
     576#define VERR_SSM_TOO_MANY_PASSES                (-1854)
    575577/** Giving up a live snapshot/migration attempt because the state grew to
    576578 * big. */
    577 #define VERR_SSM_STATE_GREW_TOO_BIG             (-1854)
     579#define VERR_SSM_STATE_GREW_TOO_BIG             (-1855)
    578580/** Giving up a live snapshot attempt because we're low on disk space.  */
    579 #define VERR_SSM_LOW_ON_DISK_SPACE              (-1855)
     581#define VERR_SSM_LOW_ON_DISK_SPACE              (-1856)
    580582/** The operation was cancelled. */
    581 #define VERR_SSM_CANCELLED                      (-1856)
     583#define VERR_SSM_CANCELLED                      (-1857)
    582584/** Nothing that can be cancelled.  */
    583 #define VERR_SSM_NO_PENDING_OPERATION           (-1857)
     585#define VERR_SSM_NO_PENDING_OPERATION           (-1858)
    584586/** The operation has already been cancelled. */
    585 #define VERR_SSM_ALREADY_CANCELLED              (-1858)
     587#define VERR_SSM_ALREADY_CANCELLED              (-1859)
    586588/** The machine was powered off while saving. */
    587 #define VERR_SSM_LIVE_POWERED_OFF               (-1859)
     589#define VERR_SSM_LIVE_POWERED_OFF               (-1860)
    588590/** The live snapshot/migration operation was aborted because of a guru
    589591 *  meditation. */
    590 #define VERR_SSM_LIVE_GURU_MEDITATION           (-1860)
     592#define VERR_SSM_LIVE_GURU_MEDITATION           (-1861)
    591593/** The live snapshot/migration operation was aborted because of a fatal runtime
    592594 *  error. */
    593 #define VERR_SSM_LIVE_FATAL_ERROR               (-1861)
     595#define VERR_SSM_LIVE_FATAL_ERROR               (-1862)
    594596/** The VM was suspended while saving, don't resume execution. */
    595 #define VINF_SSM_LIVE_SUSPENDED                  1862
     597#define VINF_SSM_LIVE_SUSPENDED                  1863
    596598/** @} */
    597599
  • trunk/include/VBox/ssm.h

    r23598 r23709  
    170170 * @retval  VINF_SUCCESS if done.
    171171 * @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.
    172174 * @retval  VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up.
    173175 *
     
    295297 * @retval  VINF_SUCCESS if done.
    296298 * @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.
    297301 * @retval  VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up.
    298302 *
     
    421425 * @retval  VINF_SUCCESS if done.
    422426 * @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.
    423429 * @retval  VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up.
    424430 *
     
    541547 * being called every time.
    542548 *
    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 *
    544556 * @param   pSSM            SSM operation handle.
    545557 * @param   pvUser          User argument.
  • trunk/src/VBox/VMM/SSM.cpp

    r23668 r23709  
    42604260static int ssmR3LiveDoVoteRun(PVM pVM, PSSMHANDLE pSSM, uint32_t uPass)
    42614261{
     4262    int rcRet = VINF_SUCCESS;
    42624263    AssertRC(pSSM->rc);
    42634264    pSSM->rc = VINF_SUCCESS;
     
    42654266    for (PSSMUNIT pUnit = pVM->ssm.s.pHead; pUnit; pUnit = pUnit->pNext)
    42664267    {
    4267         if (pUnit->u.Common.pfnLiveVote)
     4268        if (    pUnit->u.Common.pfnLiveVote
     4269            &&  !pUnit->fDoneLive)
    42684270        {
    42694271            int rc;
     
    42934295                {
    42944296                    Log(("ssmR3DoLiveVoteRun: '%s'/#%u -> VINF_SSM_VOTE_FOR_ANOTHER_PASS (pass=%u)\n", pUnit->szName, pUnit->u32Instance, uPass));
    4295                     return VINF_SSM_VOTE_FOR_ANOTHER_PASS;
     4297                    rcRet = VINF_SSM_VOTE_FOR_ANOTHER_PASS;
    42964298                }
    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                }
    43064315            }
    43074316        }
    43084317    }
    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;
    43124321}
    43134322
     
    43344343         * Skip units without a callback (this is most).
    43354344         */
    4336         if (!pUnit->u.Common.pfnLiveExec)
     4345        if (   !pUnit->u.Common.pfnLiveExec
     4346            || pUnit->fDoneLive)
    43374347            continue;
    43384348        pUnit->offStream = ssmR3StrmTell(&pSSM->Strm);
  • trunk/src/VBox/VMM/SSMInternal.h

    r22884 r23709  
    6767     * done or not. */
    6868    bool                    fCalled;
     69    /** Finished its live part.
     70     * This is used to handle VERR_SSM_VOTE_FOR_GIVING_UP.  */
     71    bool                    fDoneLive;
    6972    /** Callback interface type. */
    7073    SSMUNITTYPE             enmType;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette