VirtualBox

Changeset 23013 in vbox


Ignore:
Timestamp:
Sep 14, 2009 4:41:46 PM (15 years ago)
Author:
vboxsync
Message:

PDMAsyncCompletion: Make it work on Solaris. directio doesn't work on ZFS unfortunately. Shouldn't really matter because ZFS supports write throttling to prevent the issues we encountered with other hosts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp

    r22981 r23013  
    593593    }
    594594
    595     pEpFile->fFlags = fFileFlags;
    596 
    597595    /* Open with final flags. */
    598596    rc = RTFileOpen(&pEpFile->File, pszUri, fFileFlags);
     597    if (rc == VERR_INVALID_FUNCTION)
     598    {
     599        /*
     600         * Solaris doesn't support directio on ZFS so far. :-\
     601         * Trying to enable it returns VERR_INVALID_FUNCTION
     602         * (ENOTTY). Remove it and hope for the best.
     603         * ZFS supports write throttling in case applications
     604         * write more data than can be synced to the disk
     605         * without blocking the whole application.
     606         */
     607        fFileFlags &= ~RTFILE_O_NO_CACHE;
     608
     609        /* Open again. */
     610        rc = RTFileOpen(&pEpFile->File, pszUri, fFileFlags);
     611    }
     612
    599613    if (RT_SUCCESS(rc))
    600614    {
     615        pEpFile->fFlags = fFileFlags;
     616
    601617        rc = RTFileGetSize(pEpFile->File, (uint64_t *)&pEpFile->cbFile);
    602618        if (RT_SUCCESS(rc))
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