VirtualBox

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


Ignore:
Timestamp:
Nov 13, 2012 10:35:55 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
82046
Message:

Storage: Introduce new flag to skip unnecessary consistency checks in the VMDK backend while opening an image in readonly mode to speed up opening snapshots

Location:
trunk/src/VBox/Storage
Files:
2 edited

Legend:

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

    r43787 r43861  
    53575357                           rc = VERR_INVALID_PARAMETER);
    53585358        AssertMsgBreakStmt((uOpenFlags & ~VD_OPEN_FLAGS_MASK) == 0,
     5359                           ("uOpenFlags=%#x\n", uOpenFlags),
     5360                           rc = VERR_INVALID_PARAMETER);
     5361        AssertMsgBreakStmt(   !(uOpenFlags & VD_OPEN_FLAGS_SKIP_CONSISTENCY_CHECKS)
     5362                           ||  (uOpenFlags & VD_OPEN_FLAGS_READONLY),
    53595363                           ("uOpenFlags=%#x\n", uOpenFlags),
    53605364                           rc = VERR_INVALID_PARAMETER);
  • trunk/src/VBox/Storage/VMDK.cpp

    r43818 r43861  
    10861086        *pGDTmp = RT_LE2H_U32(*pGDTmp);
    10871087
    1088     if (pExtent->uSectorRGD)
     1088    if (   pExtent->uSectorRGD
     1089        && !(pImage->uOpenFlags & VD_OPEN_FLAGS_SKIP_CONSISTENCY_CHECKS))
    10891090    {
    10901091        /* The VMDK 1.1 spec seems to talk about compressed grain directories,
     
    65486549        else
    65496550            rc = VERR_INVALID_PARAMETER;
    6550         goto out;
    6551     }
    6552 
    6553     /* Implement this operation via reopening the image. */
    6554     vmdkFreeImage(pImage, false);
    6555     rc = vmdkOpenImage(pImage, uOpenFlags);
     6551    }
     6552    else
     6553    {
     6554        /* Implement this operation via reopening the image. */
     6555        vmdkFreeImage(pImage, false);
     6556        rc = vmdkOpenImage(pImage, uOpenFlags);
     6557    }
    65566558
    65576559out:
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