VirtualBox

Changeset 27525 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 19, 2010 11:29:06 AM (15 years ago)
Author:
vboxsync
Message:

VMDK: Only update the modification UUID if it changed from the previous value. Avoids a lot of unneccessary 1-byte writes during VDFlush

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r27477 r27525  
    56375637        if (!(pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY))
    56385638        {
    5639             pImage->ModificationUuid = *pUuid;
    5640             rc = vmdkDescDDBSetUuid(pImage, &pImage->Descriptor,
    5641                                     VMDK_DDB_MODIFICATION_UUID, pUuid);
    5642             if (RT_FAILURE(rc))
    5643                 return vmdkError(pImage, rc, RT_SRC_POS, N_("VMDK: error storing modification UUID in descriptor in '%s'"), pImage->pszFilename);
     5639            /*
     5640             * Only change the modification uuid if it changed.
     5641             * Avoids a lot of unneccessary 1-byte writes during
     5642             * vmdkFlush.
     5643             */
     5644            if (RTUuidCompare(&pImage->ModificationUuid, pUuid))
     5645            {
     5646                pImage->ModificationUuid = *pUuid;
     5647                rc = vmdkDescDDBSetUuid(pImage, &pImage->Descriptor,
     5648                                        VMDK_DDB_MODIFICATION_UUID, pUuid);
     5649                if (RT_FAILURE(rc))
     5650                    return vmdkError(pImage, rc, RT_SRC_POS, N_("VMDK: error storing modification UUID in descriptor in '%s'"), pImage->pszFilename);
     5651            }
    56445652            rc = VINF_SUCCESS;
    56455653        }
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