VirtualBox

Ignore:
Timestamp:
Feb 16, 2011 9:22:22 PM (14 years ago)
Author:
vboxsync
Message:

DrvVD: Make use of the new flag in case UseNewIo is unset but there is a bandwidth group assigned

File:
1 edited

Legend:

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

    r35353 r36003  
    191191    /** Bandwidth group the disk is assigned to. */
    192192    char               *pszBwGroup;
     193    /** Flag whether async I/O using the host cache is enabled. */
     194    bool                fAsyncIoWithHostCache;
    193195
    194196    /** I/O interface for a cache image. */
     
    372374                    fFlags |= PDMACEP_FILE_FLAGS_DONT_LOCK;
    373375                }
     376                if (pThis->fAsyncIoWithHostCache)
     377                    fFlags |= PDMACEP_FILE_FLAGS_HOST_CACHE_ENABLED;
    374378
    375379                rc = PDMR3AsyncCompletionEpCreateForFile(&pStorageBackend->pEndpoint,
     
    23782382            pThis->VDITcpNetCallbacks.pfnPoke = drvvdINIPPoke;
    23792383#endif /* VBOX_WITH_INIP */
     2384        }
     2385
     2386        /*
     2387         * The image has a bandwidth group but the host cache is enabled.
     2388         * Use the async I/O framework but tell it to enable the host cache.
     2389         */
     2390        if (!fUseNewIo && pThis->pszBwGroup)
     2391        {
     2392            pThis->fAsyncIoWithHostCache = true;
     2393            fUseNewIo = true;
    23802394        }
    23812395
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