diff options
author | Fengguang Wu <wfg@mail.ustc.edu.cn> | 2007-10-16 04:24:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:52 -0400 |
commit | f4e6b498d6e06742d72706ef50593a9c4dd72214 (patch) | |
tree | 74a573302b2ea086c0d21907175be604f110f5b1 /include/linux/fs.h | |
parent | 0bb7ba6b9c358c12084a3cbc6ac08c8d1e973937 (diff) |
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>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 8250811081ff..500ffc0e4ac7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -704,8 +704,7 @@ struct file_ra_state { | |||
704 | 704 | ||
705 | unsigned int ra_pages; /* Maximum readahead window */ | 705 | unsigned int ra_pages; /* Maximum readahead window */ |
706 | int mmap_miss; /* Cache miss stat for mmap accesses */ | 706 | int mmap_miss; /* Cache miss stat for mmap accesses */ |
707 | unsigned long prev_index; /* Cache last read() position */ | 707 | loff_t prev_pos; /* Cache last read() position */ |
708 | unsigned int prev_offset; /* Offset where last read() ended in a page */ | ||
709 | }; | 708 | }; |
710 | 709 | ||
711 | /* | 710 | /* |