Skip to content
  • Stefan Hajnoczi's avatar
    block: add cache=directsync parameter to -drive · 92196b2f
    Stefan Hajnoczi authored
    
    
    This patch adds -drive cache=directsync for O_DIRECT | O_SYNC host file
    I/O with no disk write cache presented to the guest.
    
    This mode is useful when guests may not be sending flushes when
    appropriate and therefore leave data at risk in case of power failure.
    When cache=directsync is used, write operations are only completed to
    the guest when data is safely on disk.
    
    This new mode is like cache=writethrough but it bypasses the host page
    cache.
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    92196b2f