mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
readahead: code cleanup
Rename file_ra_state.prev_page to prev_index and file_ra_state.offset to prev_offset. Also update of prev_index in do_generic_mapping_read() is now moved close to the update of prev_offset. [wfg@mail.ustc.edu.cn: fix it] Signed-off-by: Jan Kara <jack@suse.cz> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: WU Fengguang <wfg@mail.ustc.edu.cn> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ec0f163722
commit
6ce745ed39
3 changed files with 21 additions and 20 deletions
|
@ -696,13 +696,13 @@ struct file_ra_state {
|
|||
unsigned long size;
|
||||
unsigned long flags; /* ra flags RA_FLAG_xxx*/
|
||||
unsigned long cache_hit; /* cache hit count*/
|
||||
unsigned long prev_page; /* Cache last read() position */
|
||||
unsigned long prev_index; /* Cache last read() position */
|
||||
unsigned long ahead_start; /* Ahead window */
|
||||
unsigned long ahead_size;
|
||||
unsigned long ra_pages; /* Maximum readahead window */
|
||||
unsigned long mmap_hit; /* Cache hit stat for mmap accesses */
|
||||
unsigned long mmap_miss; /* Cache miss stat for mmap accesses */
|
||||
unsigned int offset; /* Offset where last read() ended in a page */
|
||||
unsigned int prev_offset; /* Offset where last read() ended in a page */
|
||||
};
|
||||
#define RA_FLAG_MISS 0x01 /* a cache miss occured against this file */
|
||||
#define RA_FLAG_INCACHE 0x02 /* file is already in cache */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue