/* If the underlying virtio-blk device doesn't support flushing (ie. write-caching), then this function should not be called by higher layers, according to EFI_BLOCK_IO_MEDIA characteristics set in  */
EFI_STATUS EFIAPI VirtioBlkFlushBlocks(IN EFI_BLOCK_IO_PROTOCOL *This)
/* If the underlying virtio-blk device doesn't support flushing (ie. write-caching), then this function should not be called by higher layers, according to EFI_BLOCK_IO_MEDIA characteristics set in  */
EFI_STATUS EFIAPI VirtioBlkFlushBlocks(IN EFI_BLOCK_IO_PROTOCOL *This)
{
  VBLK_DEV  *Dev;
  Dev = VIRTIO_BLK_FROM_BLOCK_IO (This);
  return Dev->BlockIoMedia.WriteCaching ?
         SynchronousRequest (
           Dev,
           0,
           0,
           NULL,
           TRUE
           ) :
         EFI_SUCCESS;
}