forked from len0rd/rockbox
Revert "storage: Disk Cache buffer size may need to be larger than SECTOR_SIZE"
This reverts commit dcec6828a3
.
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
This commit is contained in:
parent
dcec6828a3
commit
7ea64a315b
1 changed files with 5 additions and 25 deletions
|
@ -107,30 +107,10 @@
|
|||
#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)
|
||||
/* 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
|
||||
#endif
|
||||
|
||||
#if !defined(DC_CACHE_BUFSIZE)
|
||||
#else
|
||||
#define DC_CACHE_BUFSIZE SECTOR_SIZE
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue