diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2017-03-12 22:05:44 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2017-03-12 22:05:44 -0400 |
commit | 6db80020b45ae22b19524b01f60d0653d70ac7ca (patch) | |
tree | 924a9944abe38e094cdbc4b70d0489ed6bc162ce /firmware/include/disk_cache.h | |
parent | 70c929179b80e0657e31558e34d2bc62e1176564 (diff) | |
download | rockbox-6db80020b45ae22b19524b01f60d0653d70ac7ca.tar.gz rockbox-6db80020b45ae22b19524b01f60d0653d70ac7ca.zip |
Do some housekeeping with fat.h and SECTOR_SIZE
Many includes of fat.h are pointless. Some includes are just for
SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that
and to define tuneable values that were scattered amongst various
headers.
Remove some local definitions of SECTOR_SIZE since they have to be
in agreement with the rest of the fs code anyway.
(We'll see what's in fact pointless in a moment ;)
Change-Id: I9ba183bf58bd87f5c45eba7bd675c7e2c1c18ed5
Diffstat (limited to 'firmware/include/disk_cache.h')
-rw-r--r-- | firmware/include/disk_cache.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/firmware/include/disk_cache.h b/firmware/include/disk_cache.h index 725b3778cc..79b2ccf2c6 100644 --- a/firmware/include/disk_cache.h +++ b/firmware/include/disk_cache.h | |||
@@ -21,29 +21,6 @@ | |||
21 | #ifndef DISK_CACHE_H | 21 | #ifndef DISK_CACHE_H |
22 | #define DISK_CACHE_H | 22 | #define DISK_CACHE_H |
23 | 23 | ||
24 | /* This needs enough for all file handles to have a buffer in the worst case | ||
25 | * plus at least one reserved exclusively for the cache client and a couple | ||
26 | * for other file system code. The buffers are put to use by the cache if not | ||
27 | * taken for another purpose (meaning nothing is wasted sitting fallow). | ||
28 | * | ||
29 | * One map per volume is maintained in order to avoid collisions between | ||
30 | * volumes that would slow cache probing. DC_MAP_NUM_ENTRIES is the number | ||
31 | * for each map per volume. The buffers themselves are shared. | ||
32 | */ | ||
33 | #if MEMORYSIZE < 8 | ||
34 | #define DC_NUM_ENTRIES 32 | ||
35 | #define DC_MAP_NUM_ENTRIES 128 | ||
36 | #elif MEMORYSIZE <= 32 | ||
37 | #define DC_NUM_ENTRIES 48 | ||
38 | #define DC_MAP_NUM_ENTRIES 128 | ||
39 | #else /* MEMORYSIZE > 32 */ | ||
40 | #define DC_NUM_ENTRIES 64 | ||
41 | #define DC_MAP_NUM_ENTRIES 256 | ||
42 | #endif /* MEMORYSIZE */ | ||
43 | |||
44 | /* this _could_ be larger than a sector if that would ever be useful */ | ||
45 | #define DC_CACHE_BUFSIZE SECTOR_SIZE | ||
46 | |||
47 | #include "mutex.h" | 24 | #include "mutex.h" |
48 | #include "mv.h" | 25 | #include "mv.h" |
49 | 26 | ||