VirtualBox

Changeset 43739 in vbox for trunk/src/VBox/Storage


Ignore:
Timestamp:
Oct 25, 2012 1:51:28 PM (12 years ago)
Author:
vboxsync
Message:

Storage/VD: workaround for bug related to UUID handling of images which have no UUID, e.g. iSCSI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/VD.cpp

    r43141 r43739  
    68546854        fLockWrite = true;
    68556855
    6856         /* Update parent UUID so that image chain is consistent. */
     6856        /* Update parent UUID so that image chain is consistent.
     6857         * The two attempts work around the problem that some backends
     6858         * (e.g. iSCSI) do not support UUIDs, so we exploit the fact that
     6859         * so far there can only be one such image in the chain. */
     6860        /** @todo needs a better long-term solution, passing the UUID
     6861         * knowledge from the caller or some such */
    68576862        RTUUID Uuid;
    68586863        PVDIMAGE pImageChild = NULL;
     
    68616866            if (pImageFrom->pPrev)
    68626867            {
     6868                /* plan A: ask the parent itself for its UUID */
    68636869                rc = pImageFrom->pPrev->Backend->pfnGetUuid(pImageFrom->pPrev->pBackendData,
    68646870                                                            &Uuid);
     6871                if (RT_FAILURE(rc))
     6872                {
     6873                    /* plan B: ask the child of the parent for parent UUID */
     6874                    rc = pImageFrom->Backend->pfnGetParentUuid(pImageFrom->pBackendData,
     6875                                                               &Uuid);
     6876                }
    68656877                AssertRC(rc);
    68666878            }
     
    68766888            if (pImageFrom->pNext)
    68776889            {
     6890                /* plan A: ask the parent itself for its UUID */
    68786891                rc = pImageTo->Backend->pfnGetUuid(pImageTo->pBackendData,
    68796892                                                   &Uuid);
     6893                if (RT_FAILURE(rc))
     6894                {
     6895                    /* plan B: ask the child of the parent for parent UUID */
     6896                    rc = pImageTo->pNext->Backend->pfnGetParentUuid(pImageTo->pNext->pBackendData,
     6897                                                                    &Uuid);
     6898                }
    68806899                AssertRC(rc);
    68816900
Note: See TracChangeset for help on using the changeset viewer.

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