VirtualBox

Changeset 29341 in vbox


Ignore:
Timestamp:
May 11, 2010 11:15:22 AM (15 years ago)
Author:
vboxsync
Message:

DrvBlock: Async flushes are not ignored by default

File:
1 edited

Legend:

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

    r29034 r29341  
    8585    /** HACK: Disable flushes for this drive. */
    8686    bool                    fIgnoreFlush;
     87    /** Disable async flushes for this drive. */
     88    bool                    fIgnoreFlushAsync;
    8789#endif /* VBOX_IGNORE_FLUSH */
    8890    /** Pointer to the media driver below us.
     
    338340
    339341#ifdef VBOX_IGNORE_FLUSH
    340     if (pThis->fIgnoreFlush)
     342    if (pThis->fIgnoreFlushAsync)
    341343        return VINF_VD_ASYNC_IO_FINISHED;
    342344#endif /* VBOX_IGNORE_FLUSH */
     
    752754     */
    753755#if defined(VBOX_PERIODIC_FLUSH) || defined(VBOX_IGNORE_FLUSH)
    754     if (!CFGMR3AreValuesValid(pCfg, "Type\0Locked\0BIOSVisible\0AttachFailError\0Cylinders\0Heads\0Sectors\0Mountable\0FlushInterval\0IgnoreFlush\0"))
     756    if (!CFGMR3AreValuesValid(pCfg, "Type\0Locked\0BIOSVisible\0AttachFailError\0Cylinders\0Heads\0Sectors\0Mountable\0FlushInterval\0IgnoreFlush\0IgnoreFlushAsync\0"))
    755757#else /* !(VBOX_PERIODIC_FLUSH || VBOX_IGNORE_FLUSH) */
    756758    if (!CFGMR3AreValuesValid(pCfg, "Type\0Locked\0BIOSVisible\0AttachFailError\0Cylinders\0Heads\0Sectors\0Mountable\0"))
     
    912914    else
    913915        LogRel(("DrvBlock: Flushes will be passed to the disk\n"));
     916
     917    rc = CFGMR3QueryBoolDef(pCfg, "IgnoreFlushAsync", &pThis->fIgnoreFlushAsync, false);
     918    if (RT_FAILURE(rc))
     919        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"IgnoreFlushAsync\" from the config"));
     920
     921    if (pThis->fIgnoreFlushAsync)
     922        LogRel(("DrvBlock: Async flushes will be ignored\n"));
     923    else
     924        LogRel(("DrvBlock: Async flushes will be passed to the disk\n"));
    914925#endif /* VBOX_IGNORE_FLUSH */
    915926
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