fat: replace LINEAR_PREFETCH_SIZE with PREFETCH_BLOCKS

Currently in do_fat_read() when reading FAT sectors, we have to divide down
LINEAR_PREFETCH_SIZE by the sector size, whereas it's defined as 2 sectors
worth of bytes. In order to avoid redundant multiplication/division, introduce
#define PREFETCH_BLOCKS instead of #define LINEAR_PREFETCH_SIZE.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
This commit is contained in:
Sergei Shtylyov
2011-08-19 09:37:46 +00:00
committed by Wolfgang Denk
parent 40e219165b
commit 025421eab4
2 changed files with 5 additions and 6 deletions

View File

@@ -33,7 +33,7 @@
/* Maximum Long File Name length supported here is 128 UTF-16 code units */
#define VFAT_MAXLEN_BYTES 256 /* Maximum LFN buffer in bytes */
#define VFAT_MAXSEQ 9 /* Up to 9 of 13 2-byte UTF-16 entries */
#define LINEAR_PREFETCH_SIZE (mydata->sect_size*2) /* Prefetch buffer size */
#define PREFETCH_BLOCKS 2
#define MAX_CLUSTSIZE 65536
#define DIRENTSPERBLOCK (mydata->sect_size / sizeof(dir_entry))