Changeset 51073 in vbox
- Timestamp:
- Apr 15, 2014 10:19:33 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VD.cpp
r50991 r51073 206 206 /** Pointer to the filter backend interface. */ 207 207 PCVDFILTERBACKEND pBackend; 208 /** Pointer to list of VD interfaces, per-filter. */ 209 PVDINTERFACE pVDIfsFilter; 210 /** I/O related things. */ 211 VDIO VDIo; 208 212 } VDFILTER; 209 213 /** Pointer to a VD filter instance. */ … … 992 996 { 993 997 PVDFILTER pFilterCurr = pDisk->pFilterHead; 998 999 /* Reset buffer before starting. */ 1000 RTSgBufReset(&pIoCtx->Req.Io.SgBuf); 994 1001 995 1002 do … … 4842 4849 size_t cbCreated = 0; 4843 4850 4851 /** @todo: It is possible that this gets called from a filter plugin 4852 * outside of the disk lock. Refine assertion or remove completely. */ 4853 #if 0 4844 4854 /** @todo: Enable check for sync I/O later. */ 4845 4855 if (!(pIoCtx->fFlags & VDIOCTX_FLAGS_SYNC)) 4846 4856 VD_IS_LOCKED(pDisk); 4857 #endif 4847 4858 4848 4859 cbCreated = RTSgBufSegArrayCreate(&pIoCtx->Req.Io.SgBuf, paSeg, pcSeg, cbData); … … 6174 6185 } 6175 6186 6176 rc = pFilter->pBackend->pfnCreate(pDisk->pVDIfsDisk, pVDIfsFilter, 6187 pFilter->VDIo.pDisk = pDisk; 6188 pFilter->pVDIfsFilter = pVDIfsFilter; 6189 6190 /* Set up the internal I/O interface. */ 6191 AssertBreakStmt(!VDIfIoIntGet(pVDIfsFilter), rc = VERR_INVALID_PARAMETER); 6192 vdIfIoIntCallbacksSetup(&pFilter->VDIo.VDIfIoInt); 6193 rc = VDInterfaceAdd(&pFilter->VDIo.VDIfIoInt.Core, "VD_IOINT", VDINTERFACETYPE_IOINT, 6194 &pFilter->VDIo, sizeof(VDINTERFACEIOINT), &pFilter->pVDIfsFilter); 6195 AssertRC(rc); 6196 6197 rc = pFilter->pBackend->pfnCreate(pDisk->pVDIfsDisk, pFilter->pVDIfsFilter, 6177 6198 &pFilter->pvBackendData); 6178 6199 … … 9972 9993 { 9973 9994 if (ASMAtomicCmpXchgBool(&pIoCtx->fComplete, true, false)) 9995 { 9996 rc2 = vdFilterChainApplyRead(pDisk, pIoCtx->Req.Io.uOffsetXferOrig, 9997 pIoCtx->Req.Io.cbXferOrig, pIoCtx); 9998 if (RT_FAILURE(rc2)) 9999 rc = rc2; 9974 10000 vdIoCtxFree(pDisk, pIoCtx); 10001 } 9975 10002 else 9976 10003 rc = VERR_VD_ASYNC_IO_IN_PROGRESS; /* Let the other handler complete the request. */
Note:
See TracChangeset
for help on using the changeset viewer.