VirtualBox

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


Ignore:
Timestamp:
Jan 25, 2016 12:23:10 PM (9 years ago)
Author:
vboxsync
Message:

Storage/VD: Remove the custom code in each backend which allocates all blocks in a fixed size image by writing zeros to it. Preparations to make use of more optimized methods to allocate large files on recent hosts (fallocate() and friends)

File:
1 edited

Legend:

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

    r59448 r59455  
    767767
    768768    return PDMR3AsyncCompletionEpSetSize(pStorageBackend->pEndpoint, cbSize);
     769}
     770
     771static DECLCALLBACK(int) drvvdAsyncIOSetAllocationSize(void *pvUser, void *pStorage, uint64_t cbSize,
     772                                                       uint32_t fFlags)
     773{
     774    PVBOXDISK pDrvVD = (PVBOXDISK)pvUser;
     775    return VERR_NOT_SUPPORTED;
    769776}
    770777
     
    43424349            {
    43434350#ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
    4344                 pImage->VDIfIo.pfnOpen       = drvvdAsyncIOOpen;
    4345                 pImage->VDIfIo.pfnClose      = drvvdAsyncIOClose;
    4346                 pImage->VDIfIo.pfnGetSize    = drvvdAsyncIOGetSize;
    4347                 pImage->VDIfIo.pfnSetSize    = drvvdAsyncIOSetSize;
    4348                 pImage->VDIfIo.pfnReadSync   = drvvdAsyncIOReadSync;
    4349                 pImage->VDIfIo.pfnWriteSync  = drvvdAsyncIOWriteSync;
    4350                 pImage->VDIfIo.pfnFlushSync  = drvvdAsyncIOFlushSync;
    4351                 pImage->VDIfIo.pfnReadAsync  = drvvdAsyncIOReadAsync;
    4352                 pImage->VDIfIo.pfnWriteAsync = drvvdAsyncIOWriteAsync;
    4353                 pImage->VDIfIo.pfnFlushAsync = drvvdAsyncIOFlushAsync;
     4351                pImage->VDIfIo.pfnOpen              = drvvdAsyncIOOpen;
     4352                pImage->VDIfIo.pfnClose             = drvvdAsyncIOClose;
     4353                pImage->VDIfIo.pfnGetSize           = drvvdAsyncIOGetSize;
     4354                pImage->VDIfIo.pfnSetSize           = drvvdAsyncIOSetSize;
     4355                pImage->VDIfIo.pfnSetAllocationSize = drvvdAsyncIOSetAllocationSize;
     4356                pImage->VDIfIo.pfnReadSync          = drvvdAsyncIOReadSync;
     4357                pImage->VDIfIo.pfnWriteSync         = drvvdAsyncIOWriteSync;
     4358                pImage->VDIfIo.pfnFlushSync         = drvvdAsyncIOFlushSync;
     4359                pImage->VDIfIo.pfnReadAsync         = drvvdAsyncIOReadAsync;
     4360                pImage->VDIfIo.pfnWriteAsync        = drvvdAsyncIOWriteAsync;
     4361                pImage->VDIfIo.pfnFlushAsync        = drvvdAsyncIOFlushAsync;
    43544362#else /* !VBOX_WITH_PDM_ASYNC_COMPLETION */
    43554363                rc = PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES,
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