diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-11-24 00:57:40 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-11-24 00:57:57 -0500 |
commit | 7ea64a315bb10a536a997968ef03b8855177df01 (patch) | |
tree | 2941bc5cfbb9fdb254400f35fe85ed89ee9ced46 | |
parent | dcec6828a3002963a3766256a02c1e12c961acec (diff) | |
download | rockbox-7ea64a315b.tar.gz rockbox-7ea64a315b.zip |
Revert "storage: Disk Cache buffer size may need to be larger than SECTOR_SIZE"
This reverts commit dcec6828a3002963a3766256a02c1e12c961acec.
This did not solve the reported problem, and it turns out that the original
code did the right thing with respect to the device's logical sector size.
Change-Id: I5bed2520ba8f5ca01df0ddd71588d3ed69c1d77c
-rw-r--r-- | firmware/include/fs_defines.h | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/firmware/include/fs_defines.h b/firmware/include/fs_defines.h index f4a9fa2d3e..70e083ae2e 100644 --- a/firmware/include/fs_defines.h +++ b/firmware/include/fs_defines.h @@ -107,31 +107,11 @@ #define SECTOR_SIZE 512 #endif -/* The file I/O code operates in terms of the FILESYSTEM sector size, - which may be much larger than the underlying device's logical sector size. - So we have to use the larger of the filesystem's max, the max logical, or - the the fixed logical size. -*/ - -#if defined(MAX_VIRT_SECTOR_SIZE) && defined(MAX_VARIABLE_LOG_SECTOR) -#if (MAX_VIRT_SECTOR_SIZE < MAX_VARIABLE_LOG_SECTOR) -#error "MAX_VIRT_SECTOR_SIZE < MAX_VARIABLE_LOG_SECTOR" -#endif -#if (MAX_VIRT_SECTOR_SIZE % MAX_VARIABLE_LOG_SECTOR) -#error "MAX_VIRT_SECTOR_SIZE is not a multiple of MAX_VARIABLE_LOG_SECTOR" -#endif -#endif - -#if !defined(DC_CACHE_BUFSIZE) && defined(MAX_VIRT_SECTOR_SIZE) -#define DC_CACHE_BUFSIZE MAX_VIRT_SECTOR_SIZE -#endif - -#if !defined(DC_CACHE_BUFSIZE) && defined(MAX_VARIABLE_LOG_SECTOR) -#define DC_CACHE_BUFSIZE MAX_VARIABLE_LOG_SECTOR -#endif - -#if !defined(DC_CACHE_BUFSIZE) -#define DC_CACHE_BUFSIZE SECTOR_SIZE +/* this _could_ be larger than a sector if that would ever be useful */ +#ifdef MAX_VARIABLE_LOG_SECTOR +#define DC_CACHE_BUFSIZE MAX_VARIABLE_LOG_SECTOR +#else +#define DC_CACHE_BUFSIZE SECTOR_SIZE #endif #endif /* FS_DEFINES_H */ |