|
|
Rockbox mail archiveSubject: Re: disk write testingFrom: Björn Stenberg (bjorn_at_haxx.se) Date: 2002-11-04
Greg Haerr wrote:
Thank you.
> I personally think a redesign where _all_ buffers are kept at a layer
I disagree. There is good reason for each of the three separate buffers:
1) Buffering one sector per open file means we can always provide byte-for-byte file access within the last accessed sector without accessing the disk. This is the same model buffered i/o works in most operating systems.
2) Buffering the two last read directory sectors is vital for long filename parsing, since a single long filename can span three (!) directory sectors.
3) Caching the most recently used FAT sectors means we obtain very fast access to cluster chain information, which in turn speeds up disk reads and writes substantially.
Combining these three buffers into a regular i/o buffer would slow overall performance down, because the regular very big mp3 file reads will fill the buffer every time.
> Also, the code is not set up properly to update access times on
Read access time is not implemented yet. If we want it, it is very easy to add since fat_open() knows the location of the directory entry.
File size is handled in fat_closewrite().
-- Björn
Page was last modified "Mar 9 2008" The Rockbox Crew |