Searched hist:cfe386c2 (Results 1 - 1 of 1) sorted by last modified time

/haiku/src/system/kernel/cache/
H A Dfile_cache.cppdiff cfe386c2 Thu Nov 08 06:45:04 MST 2007 Axel Dörfler <axeld@pinc-software.de> * read_into_cache() and write_to_cache() both did not compute the number of
needed pages correctly, and would also not read/write enough in case the
offset didn't start at 0 resulting in undetected short reads/writes. It's
amazing how many bugs can be hidden in a few lines of code.
* Fixed a bug that might have been the cause for bug #1601: when the last part
of the write did not end on a page boundary, the last page had to be read
first, but that was done from the wrong offset. Also, if only parts of that
page could be read (because the file size didn't span over the whole page)
the remaining parts needed to be cleared.
* The cache_funcs were always called with the same value for numBytes and
bufferSize so I've eliminated the former.
* Large reads now also bypass the cache in case of low memory, large writes now
also only bypass the cache in that case, following Ingo's suggestion.
* Fixed compilation with debugging turned on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22858 a95241bf-73f2-0310-859d-f6bbb57e9c96

Completed in 66 milliseconds