Changeset 59827 in vbox for trunk/src/VBox/Runtime/common/vfs
- Timestamp:
- Feb 25, 2016 9:04:12 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 105720
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/vfs/vfsreadahead.cpp
r59757 r59827 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define LOG_GROUP RTLOGGROUP_VFS 31 32 #include "internal/iprt.h" 32 33 #include <iprt/vfs.h> … … 37 38 #include <iprt/file.h> 38 39 #include <iprt/list.h> 40 #include <iprt/log.h> 39 41 #include <iprt/poll.h> 40 42 #include <iprt/string.h> … … 277 279 { 278 280 rc = pcbRead ? VINF_EOF : VERR_EOF; 281 Log(("rtVfsReadAhead_Read: ret %Rrc; offCur=%#llx offEof=%#llx\n", rc, offCur, pThis->offEof)); 279 282 break; 280 283 } … … 308 311 RTSgBufInit(&TmpSgBuf, &TmpSeg, 1); 309 312 size_t cbThisRead = cbDst; 310 rc = RTVfsIoStrmSgRead(pThis->hIos, off, pSgBuf, fBlocking, pcbRead ? &cbThisRead : NULL);313 rc = RTVfsIoStrmSgRead(pThis->hIos, off, &TmpSgBuf, fBlocking, pcbRead ? &cbThisRead : NULL); 311 314 if (RT_SUCCESS(rc)) 312 315 { 313 cbTotalRead = cbThisRead;314 offCur += cbThisRead;316 cbTotalRead += cbThisRead; 317 offCur += cbThisRead; 315 318 pThis->offConsumer = offCur; 316 319 if (rc != VINF_EOF) 317 320 fPokeReader = true; 318 321 else 322 { 319 323 pThis->offEof = offCur; 324 Log(("rtVfsReadAhead_Read: EOF %llu (%#llx)\n", pThis->offEof, pThis->offEof)); 325 } 320 326 } 321 327 /* else if (rc == VERR_EOF): hard to say where exactly the current position … … 331 337 if (pcbRead) 332 338 *pcbRead = cbTotalRead; 339 Assert(cbTotalRead <= pSgBuf->paSegs[0].cbSeg); 333 340 334 341 return rc; … … 583 590 { 584 591 if (rc == VINF_EOF) 592 { 585 593 pThis->offEof = pBufDesc->off + cbRead; 594 Log(("rtVfsReadAheadThreadProc: EOF %llu (%#llx)\n", pThis->offEof, pThis->offEof)); 595 } 586 596 pBufDesc->cbFilled = (uint32_t)cbRead; 587 597 … … 669 679 if (cBuffers == 0) 670 680 cBuffers = 4; 671 AssertStmt(cbBuffer <= _ 512K, rc = VERR_OUT_OF_RANGE);681 AssertStmt(cbBuffer <= _4M, rc = VERR_OUT_OF_RANGE); 672 682 if (cbBuffer == 0) 673 683 cbBuffer = _256K / cBuffers; 684 AssertStmt(cbBuffer * cBuffers < (ARCH_BITS < 64 ? _64M : _256M), rc = VERR_OUT_OF_RANGE); 674 685 AssertStmt(!fFlags, rc = VERR_INVALID_FLAGS); 675 686
Note:
See TracChangeset
for help on using the changeset viewer.