VDIoBackend.cpp revision b24ec0830a8066f6baf834863144169b3eb21aaf
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * VBox HDD container test utility, I/O backend API
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Copyright (C) 2013 Oracle Corporation
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * available from http://www.virtualbox.org. This file is free software;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * you can redistribute it and/or modify it under the terms of the GNU
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * General Public License (GPL) as published by the Free Software
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#define LOGGROUP LOGGROUP_DEFAULT /** @todo: Log group */
#include "VDIoBackend.h"
#include "VDMemDisk.h"
#include "VDIoBackendMem.h"
typedef struct VDIOBACKEND
} VDIOBACKEND;
typedef struct VDIOSTORAGE
bool fMemory;
} File;
} VDIOSTORAGE;
static DECLCALLBACK(void) vdIoBackendFileIoComplete(RTAIOMGRFILE hAioMgrFile, int rcReq, void *pvUser)
if (pIoBackend)
return rc;
if (pIoStorage)
return rc;
if (!fSync)
pvUser);
switch (enmTxDir)
case VDIOTXDIR_READ:
case VDIOTXDIR_WRITE:
case VDIOTXDIR_FLUSH:
if (!fSync)
switch (enmTxDir)
case VDIOTXDIR_READ:
case VDIOTXDIR_WRITE:
case VDIOTXDIR_FLUSH:
switch (enmTxDir)
case VDIOTXDIR_READ:
case VDIOTXDIR_WRITE:
case VDIOTXDIR_FLUSH:
return rc;
return rc;
return rc;
return rc;