VBoxHDD.cpp revision 037bb2a3e9d81a494a15e37911a8e5cdc565fb5d
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * VBoxHDD - VBox HDD Container implementation.
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * Copyright (C) 2006-2010 Oracle Corporation
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * available from http://www.virtualbox.org. This file is free software;
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * you can redistribute it and/or modify it under the terms of the GNU
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * General Public License (GPL) as published by the Free Software
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync/*******************************************************************************
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync* Header Files *
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync*******************************************************************************/
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync/** Buffer size used for merging images. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync/** Maximum number of segments in one I/O task. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * VD async I/O interface storage descriptor.
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** File handle. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Completion callback. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Thread for async access. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * VBox HDD Container image descriptor.
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsynctypedef struct VDIMAGE
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Link to parent image descriptor, if any. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Link to child image descriptor, if any. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Container base filename. (UTF-8) */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Data managed by the backend which keeps the actual info. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Cached sanitized image flags. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Image open flags (only those handled generically in this code and which
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * the backends will never ever see). */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Function pointers for the various backend methods. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Per image internal I/O interface. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Pointer to list of VD interfaces, per-image. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Disk this image is part of */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * uModified bit flags.
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync#define VD_IMAGE_MODIFIED_DISABLE_UUID_UPDATE RT_BIT(2)
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * VBox HDD Cache image descriptor.
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsynctypedef struct VDCACHE
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Cache base filename. (UTF-8) */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Data managed by the backend which keeps the actual info. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Cached sanitized image flags. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Image open flags (only those handled generically in this code and which
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * the backends will never ever see). */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Function pointers for the various backend methods. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Per image internal I/O interface. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Pointer to list of VD interfaces, per-cache. */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync /** Disk this image is part of */
cda4a68d59969f27d3063ff91c9c3f887d34c8f9vboxsync * VBox HDD Container main structure, private part.
unsigned cImages;
unsigned uModified;
volatile bool fGrowing;
typedef struct VDPARENTSTATEDESC
typedef enum VDIOCTXTXDIR
VDIOCTXTXDIR_READ = 0,
typedef struct VDIOCTX
int rcReq;
bool fBlocked;
volatile bool fComplete;
void *pvAllocation;
void *pvUser1;
void *pvUser2;
} Root;
} Optimized;
} Write;
} Child;
} Type;
} VDIOCTX;
typedef struct VDIOCTXDEFERRED
typedef struct VDIOTASK
void *pvUser;
bool fMeta;
} User;
} Meta;
} Type;
typedef struct VDIOSTORAGE
void *pStorage;
} VDIOSTORAGE;
typedef struct VDMETAXFER
unsigned cRefs;
} VDMETAXFER;
#ifdef VBOX_WITH_DMG
#ifdef VBOX_WITH_ISCSI
static unsigned g_cBackends = 0;
#ifdef VBOX_WITH_DMG
#ifdef VBOX_WITH_ISCSI
static unsigned g_cCacheBackends = 0;
return VERR_NO_MEMORY;
return VINF_SUCCESS;
return VERR_NO_MEMORY;
return VINF_SUCCESS;
const char *pszFormat, ...)
pDisk->pInterfaceErrorCallbacks->pfnError(pDisk->pInterfaceError->pvUser, rc, RT_SRC_POS_ARGS, pszFormat, va);
return rc;
return rc;
return rc;
return rc;
return rc;
if (!g_apBackends)
VDInit();
for (unsigned i = 0; i < g_cBackends; i++)
return rc;
if (!g_apCacheBackends)
VDInit();
for (unsigned i = 0; i < g_cCacheBackends; i++)
return rc;
nImage--;
return pImage;
return rc;
if (pcbWritten)
} while ( cbWrite
return rc;
*pcbThisRead = 0;
&cbThisRead);
&cbThisRead);
return rc;
bool fAllFree = true;
&& !pImageParentOverride)
&& fUpdateCache)
&cbThisRead);
&cbThisRead);
if (!fZeroFreeBlocks)
cbBufClear = 0;
fAllFree = false;
void *pvAllocation,
return pIoCtx;
void *pvAllocation,
return pIoCtx;
return pIoCtx;
DECLINLINE(PVDIOTASK) vdIoTaskUserAlloc(PVDIOSTORAGE pIoStorage, PFNVDXFERCOMPLETED pfnComplete, void *pvUser, PVDIOCTX pIoCtx, uint32_t cbTransfer)
if (pIoTask)
return pIoTask;
DECLINLINE(PVDIOTASK) vdIoTaskMetaAlloc(PVDIOSTORAGE pIoStorage, PFNVDXFERCOMPLETED pfnComplete, void *pvUser, PVDMETAXFER pMetaXfer)
if (pIoTask)
return pIoTask;
#ifdef DEBUG
DECLINLINE(PVDMETAXFER) vdMetaXferAlloc(PVDIMAGE pImage, PVDIOSTORAGE pIoStorage, uint64_t uOffset, size_t cb)
return pMetaXfer;
goto out;
goto out;
goto out;
out:
return rc;
int rc;
return rc;
&Uuid);
&Uuid);
void *pvTmp)
if (cbPreRead)
return rc;
if (cbPostRead)
cbWriteCopy = 0;
cbFill = 0;
if (cbWriteCopy)
if (cbReadImage)
return rc;
if (cbFill)
return rc;
* All backends which support differential/growing images support this.
void *pvTmp)
int rc;
if (cbPostRead)
return rc;
return VINF_SUCCESS;
if (cbPostRead)
if (cbWriteCopy)
if (cbFill)
return rc;
bool fUpdateCache)
int rc;
unsigned fWrite;
? 0 : VD_WRITE_NO_ALLOC;
&& fUpdateCache)
return rc;
if (cbPreRead)
return rc;
if (cbPostRead)
cbWriteCopy = 0;
cbFill = 0;
if (cbWriteCopy)
if (cbReadImage)
return rc;
if (cbFill)
return rc;
return VERR_NOT_IMPLEMENTED;
return VINF_VD_ASYNC_IO_FINISHED;
if (cbPostRead)
if (cbWriteCopy)
if (cbFill)
return rc;
return rc;
* All backends which support differential/growing images support this - async version.
if (cbPostRead)
return VINF_SUCCESS;
int rc;
unsigned fWrite;
? 0 : VD_WRITE_NO_ALLOC;
pTmp,
if (!cbWrite)
return rc;
return rc;
static int vdLoadDynamicBackends()
#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
return rc;
char *pszPluginFilter;
return rc;
goto out;
if (!pPluginDirEntry)
goto out;
while ((rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK)) != VERR_NO_MORE_FILES)
rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
LogFunc(("error resolving the entry point %s in plugin %s, rc=%Rrc, pfnHDDFormat=%#p\n", VBOX_HDDFORMAT_LOAD_NAME, pPluginDirEntry->szName, rc, pfnHDDFormatLoad));
LogFunc(("ignored plugin '%s': pBackend->cbSize=%d rc=%Rrc\n", pszPluginPath, pBackend->cbSize, rc));
out:
if (pPluginDirEntry)
if (pPluginDir)
return rc;
return VINF_SUCCESS;
static int vdLoadDynamicCacheBackends()
#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
return rc;
char *pszPluginFilter;
return rc;
goto out;
if (!pPluginDirEntry)
goto out;
while ((rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK)) != VERR_NO_MORE_FILES)
rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
LogFunc(("ignored plugin '%s': pBackend->cbSize=%d rc=%Rrc\n", pszPluginPath, pBackend->cbSize, rc));
out:
if (pPluginDirEntry)
if (pPluginDir)
return rc;
return VINF_SUCCESS;
void **ppStorage)
if (!pStorage)
return VERR_NO_MEMORY;
return VINF_SUCCESS;
return rc;
return VINF_SUCCESS;
static int vdIOGetModificationTimeFallback(void *pvUser, const char *pcszFilename, PRTTIMESPEC pModificationTime)
return rc;
void **ppTask)
return VERR_NOT_IMPLEMENTED;
void **ppTask)
return VERR_NOT_IMPLEMENTED;
return VERR_NOT_IMPLEMENTED;
LogFlowFunc(("Parent I/O context completed pIoCtxParent=%#p rcReq=%Rrc\n", pIoCtxParent, pIoCtxParent->rcReq));
return VINF_SUCCESS;
bool fIoCtxContinue = true;
if (pfnComplete)
return rc;
static int vdMetaXferCompleted(PVDIOSTORAGE pIoStorage, PFNVDXFERCOMPLETED pfnComplete, void *pvUser,
bool fFlush;
if (!fFlush)
/* Increase the reference counter to make sure it doesn't go away before the last context is processed. */
bool fContinue = true;
if (pfnComplete)
else if (fFlush)
return VINF_SUCCESS;
return rc;
if (!pIoStorage)
return VERR_NO_MEMORY;
return VINF_SUCCESS;
return rc;
return VINF_SUCCESS;
return VINF_SUCCESS;
static int vdIOIntGetModificationTime(void *pvUser, const char *pcszFilename, PRTTIMESPEC pModificationTime)
pcbSize);
cbSize);
pcbRead);
while (cbRead)
#ifdef RT_STRICT
for (unsigned i = 0; i < cSegments; i++)
if (!pIoTask)
return VERR_NO_MEMORY;
void *pvTask;
&pvTask);
return rc;
void *pvCompleteUser)
while (cbWrite)
#ifdef DEBUG
for (unsigned i = 0; i < cSegments; i++)
PVDIOTASK pIoTask = vdIoTaskUserAlloc(pIoStorage, pfnComplete, pvCompleteUser, pIoCtx, cbTaskWrite);
if (!pIoTask)
return VERR_NO_MEMORY;
void *pvTask;
&pvTask);
return rc;
void *pvCompleteUser)
if (!pMetaXfer)
#ifdef RT_STRICT
pMetaXfer = (PVDMETAXFER)RTAvlrFileOffsetGetBestFit(pIoStorage->pTreeMetaXfers, uOffset, false /* fAbove */);
if (!pMetaXfer)
return VERR_NO_MEMORY;
if (!pIoTask)
return VERR_NO_MEMORY;
&pvTask);
return rc;
void *pvCompleteUser)
bool fInTree = false;
if (!pMetaXfer)
if (!pMetaXfer)
return VERR_NO_MEMORY;
fInTree = true;
if (!pIoTask)
return VERR_NO_MEMORY;
&pvTask);
if (!fInTree)
return rc;
void *pvCompleteUser)
if (!pMetaXfer)
return VERR_NO_MEMORY;
if (!pIoTask)
return VERR_NO_MEMORY;
&pvTask);
return rc;
return cbCopied;
return cbCopied;
return cbSet;
return cbCreated;
if (!pIoStorage)
return VERR_NO_MEMORY;
return rc;
return VINF_SUCCESS;
static int vdIOIntMoveLimited(void *pvUser, const char *pcszSrc, const char *pcszDst, unsigned fMove)
static int vdIOIntGetFreeSpaceLimited(void *pvUser, const char *pcszFilename, int64_t *pcbFreeSpace)
static int vdIOIntGetModificationTimeLimited(void *pvUser, const char *pcszFilename, PRTTIMESPEC pModificationTime)
return pInterfaceIOCallbacks->pfnWriteSync(NULL, pIoStorage->pStorage, uOffset, pvBuf, cbWrite, pcbWritten);
return pInterfaceIOCallbacks->pfnReadSync(NULL, pIoStorage->pStorage, uOffset, pvBuf, cbRead, pcbRead);
return VINF_SUCCESS;
return rc;
return rc;
if (!pBackends)
return VERR_INTERNAL_ERROR;
g_cBackends = 0;
#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
for (unsigned i = 0; i < cBackends; i++)
g_cCacheBackends = 0;
#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
for (unsigned i = 0; i < cBackends; i++)
if (pCacheBackends)
return VINF_SUCCESS;
unsigned *pcEntriesUsed)
unsigned cEntries = 0;
LogFlowFunc(("cEntriesAlloc=%u pEntries=%#p pcEntriesUsed=%#p\n", cEntriesAlloc, pEntries, pcEntriesUsed));
if (!g_apBackends)
VDInit();
return VERR_BUFFER_OVERFLOW;
for (unsigned i = 0; i < g_cBackends; i++)
return rc;
if (!g_apBackends)
VDInit();
for (unsigned i = 0; i < g_cBackends; i++)
return VINF_SUCCESS;
return VERR_NOT_FOUND;
if (pDisk)
return rc;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
if (!g_apBackends)
VDInit();
if (!pInterfaceIO)
for (unsigned i = 0; i < g_cBackends; i++)
if (!pszFormat)
for (unsigned i = 0; i < g_cCacheBackends; i++)
if (!pszFormat)
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
if (!pImage)
fLockWrite = true;
unsigned uImageFlags;
unsigned uOpenFlagsPrevImg;
if (pImage)
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
if (!pCache)
fLockWrite = true;
&UuidCache);
&UuidImage);
if (pCache)
return rc;
int rc2;
LogFlowFunc(("pDisk=%#p pszBackend=\"%s\" pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" PCHS=%u/%u/%u LCHS=%u/%u/%u Uuid=%RTuuid uOpenFlags=%#x pVDIfsImage=%#p pVDIfsOperation=%#p\n",
if (pIfProgress)
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
fLockRead = false;
if (!pImage)
if (!pUuid)
fLockWrite = true;
if (pImage)
return rc;
int rc2;
LogFlowFunc(("pDisk=%#p pszBackend=\"%s\" pszFilename=\"%s\" uImageFlags=%#x pszComment=\"%s\" Uuid=%RTuuid uOpenFlags=%#x pVDIfsImage=%#p pVDIfsOperation=%#p\n",
pDisk, pszBackend, pszFilename, uImageFlags, pszComment, pUuid, uOpenFlags, pVDIfsImage, pVDIfsOperation));
if (pIfProgress)
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
fLockRead = false;
if (!pImage)
if (!pUuid)
fLockWrite = true;
unsigned uOpenFlagsPrevImg;
&Uuid);
&Uuid);
&Uuid);
&ts);
if (pImage)
return rc;
int rc2;
LogFlowFunc(("pDisk=%#p pszBackend=\"%s\" pszFilename=\"%s\" cbSIze=%llu uImageFlags=%#x pszComment=\"%s\" Uuid=%RTuuid uOpenFlags=%#x pVDIfsImage=%#p pVDIfsOperation=%#p\n",
pDisk, pszBackend, pszFilename, cbSize, uImageFlags, pszComment, pUuid, uOpenFlags, pVDIfsCache, pVDIfsOperation));
if (pIfProgress)
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
fLockRead = false;
if (!pCache)
if (!pUuid)
fLockWrite = true;
if (pCache)
return rc;
int rc2;
if (pIfProgress)
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
fLockWrite = false;
if (!pvBuf)
fLockWrite = true;
&cbThisRead);
&cbThisRead);
fLockWrite = false;
fLockWrite = true;
fLockWrite = false;
fLockWrite = true;
fLockWrite = false;
fLockWrite = true;
&Uuid);
&Uuid);
&Uuid);
&Uuid);
&& pImageChild
if (pvBuf)
return rc;
* @param fMoveByRename If true, attempt to perform a move by renaming (if successful the new size is ignored).
int rc2;
LogFlowFunc(("pDiskFrom=%#p nImage=%u pDiskTo=%#p pszBackend=\"%s\" pszFilename=\"%s\" fMoveByRename=%d cbSize=%llu pVDIfsOperation=%#p pDstVDIfsImage=%#p pDstVDIfsOperation=%#p\n",
pDiskFrom, nImage, pDiskTo, pszBackend, pszFilename, fMoveByRename, cbSize, pVDIfsOperation, pDstVDIfsImage, pDstVDIfsOperation));
if (pIfProgress)
if (pDstIfProgress)
fLockReadFrom = true;
if ( fMoveByRename
fLockReadFrom = false;
fLockWriteFrom = true;
rc = pImageFrom->Backend->pfnRename(pImageFrom->pBackendData, pszFilename ? pszFilename : pImageFrom->pszFilename);
if (cbSizeFrom == 0)
if (pDstUuid)
unsigned uOpenFlagsFrom;
fLockReadFrom = false;
if (pszFilename)
if (cbSize == 0)
/** @todo replace the VDCreateDiff/VDCreateBase calls by direct
if (cImagesTo > 0)
fLockWriteTo = true;
fLockWriteTo = true;
if (cbSizeTo == 0)
if (cbSize == 0)
fLockWriteTo = false;
if (!pvBuf)
fLockReadFrom = true;
fLockReadFrom = false;
fLockWriteTo = true;
fLockWriteTo = false;
fLockWriteTo = true;
fLockWriteTo = true;
if (pvBuf)
return rc;
int rc2;
if (pIfProgress)
fLockRead = true;
fLockRead = false;
fLockWrite = true;
if (pvBuf)
if (pvTmp)
return rc;
/** @todo r=klaus resizing was designed to be part of VDCopy, so having a separate function is not desirable. */
int rc2;
if (pIfProgress)
fLockRead = true;
fLockRead = false;
fLockWrite = true;
PCHSGeometryOld.cCylinders = RT_MIN(cbSize / 512 / PCHSGeometryOld.cHeads / PCHSGeometryOld.cSectors, 16383);
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
if (!pImage)
if (!pImage)
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
if (pCache)
return rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
return rc;
unsigned cImages;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return cImages;
bool fReadOnly;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
unsigned uOpenFlags;
return fReadOnly;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return cbSize;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return cbSize;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
&PCHS);
return rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
&LCHS);
return rc;
unsigned *puVersion)
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
unsigned *puImageFlags)
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
unsigned *puOpenFlags)
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
unsigned uOpenFlags)
int rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
return rc;
int rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
int rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
const char *pszComment)
int rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
return rc;
int rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
int rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
if (!pUuid)
return rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
pUuid);
return rc;
int rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
if (!pUuid)
pUuid);
return rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
return rc;
int rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
if (!pUuid)
return rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
*pfAIOSupported = false;
return rc;
int rc2;
bool fLockRead = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockRead = true;
if (!pIoCtx)
return rc;
int rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
if (!pIoCtx)
return rc;
int rc;
int rc2;
bool fLockWrite = false;
AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
fLockWrite = true;
0, NULL, 0,
if (!pIoCtx)
return rc;