VirtualBox

Changeset 74308 in vbox for trunk/src


Ignore:
Timestamp:
Sep 17, 2018 1:19:54 PM (6 years ago)
Author:
vboxsync
Message:

Devices/Storage/DrvVD: Don't ignore the IgnoreFlush and FlushInterval options in the access synchronous case

File:
1 edited

Legend:

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

    r73097 r74308  
    32633263        if (RT_SUCCESS(rc))
    32643264            rc = VINF_VD_ASYNC_IO_FINISHED;
     3265
     3266#ifdef VBOX_PERIODIC_FLUSH
     3267        if (pThis->cbFlushInterval)
     3268        {
     3269            pThis->cbDataWritten += (uint32_t)cbReqIo;
     3270            if (pThis->cbDataWritten > pThis->cbFlushInterval)
     3271            {
     3272                pThis->cbDataWritten = 0;
     3273                VDFlush(pThis->pDisk);
     3274            }
     3275        }
     3276#endif /* VBOX_PERIODIC_FLUSH */
    32653277    }
    32663278
     
    33003312    else
    33013313    {
    3302         rc = VDFlush(pThis->pDisk);
    3303         if (RT_SUCCESS(rc))
     3314#ifdef VBOX_IGNORE_FLUSH
     3315        if (pThis->fIgnoreFlush)
    33043316            rc = VINF_VD_ASYNC_IO_FINISHED;
     3317        else
     3318#endif /* VBOX_IGNORE_FLUSH */
     3319        {
     3320            rc = VDFlush(pThis->pDisk);
     3321            if (RT_SUCCESS(rc))
     3322                rc = VINF_VD_ASYNC_IO_FINISHED;
     3323        }
    33053324    }
    33063325
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