VirtualBox

Changeset 42040 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 6, 2012 1:54:59 PM (12 years ago)
Author:
vboxsync
Message:

Storage: Make it possible to set VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS during runtime

File:
1 edited

Legend:

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

    r42039 r42040  
    54425442        AssertRC(rc);
    54435443
    5444         pImage->uOpenFlags = uOpenFlags & (VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_DISCARD | VD_OPEN_FLAGS_IGNORE_FLUSH);
     5444        pImage->uOpenFlags = uOpenFlags & (VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_DISCARD | VD_OPEN_FLAGS_IGNORE_FLUSH | VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS);
    54455445        pImage->VDIo.fIgnoreFlush = (uOpenFlags & VD_OPEN_FLAGS_IGNORE_FLUSH) != 0;
    54465446        rc = pImage->Backend->pfnOpen(pImage->pszFilename,
    5447                                       uOpenFlags & ~(VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_IGNORE_FLUSH),
     5447                                      uOpenFlags & ~(VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_IGNORE_FLUSH | VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS),
    54485448                                      pDisk->pVDIfsDisk,
    54495449                                      pImage->pVDIfsImage,
     
    54605460                     || rc == VERR_FILE_LOCK_FAILED))
    54615461                rc = pImage->Backend->pfnOpen(pImage->pszFilename,
    5462                                                 (uOpenFlags & ~VD_OPEN_FLAGS_HONOR_SAME)
     5462                                                (uOpenFlags & ~(VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS))
    54635463                                               | VD_OPEN_FLAGS_READONLY,
    54645464                                               pDisk->pVDIfsDisk,
     
    87178717
    87188718        rc = pImage->Backend->pfnSetOpenFlags(pImage->pBackendData,
    8719                                               uOpenFlags);
     8719                                              uOpenFlags & ~(VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_IGNORE_FLUSH | VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS));
     8720        if (RT_SUCCESS(rc))
     8721            pImage->uOpenFlags = uOpenFlags & (VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_DISCARD | VD_OPEN_FLAGS_IGNORE_FLUSH | VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS);
    87208722    } while (0);
    87218723
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