mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
readahead: combine file_ra_state.prev_index/prev_offset into prev_pos
Combine the file_ra_state members unsigned long prev_index unsigned int prev_offset into loff_t prev_pos It is more consistent and better supports huge files. Thanks to Peter for the nice proposal! [akpm@linux-foundation.org: fix shift overflow] Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0bb7ba6b9c
commit
f4e6b498d6
6 changed files with 19 additions and 18 deletions
|
|
@ -704,8 +704,7 @@ struct file_ra_state {
|
|||
|
||||
unsigned int ra_pages; /* Maximum readahead window */
|
||||
int mmap_miss; /* Cache miss stat for mmap accesses */
|
||||
unsigned long prev_index; /* Cache last read() position */
|
||||
unsigned int prev_offset; /* Offset where last read() ended in a page */
|
||||
loff_t prev_pos; /* Cache last read() position */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue