Skip to content

Commit

Permalink
fs: Document file_ra_state
Browse files Browse the repository at this point in the history
Turn the comments into kernel-doc and improve the wording slightly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Dave Wysochanski <dwysocha@redhat.com>
Tested-By: Marc Dionne <marc.dionne@auristor.com>
Link: https://lore.kernel.org/r/20210407201857.3582797-3-willy@infradead.org/
Link: https://lore.kernel.org/r/161789068619.6155.1397999970593531574.stgit@warthog.procyon.org.uk/ # v6
  • Loading branch information
Matthew Wilcox (Oracle) authored and David Howells committed Apr 23, 2021
1 parent fcd9ae4 commit c790fbf
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -891,18 +891,22 @@ struct fown_struct {
int signum; /* posix.1b rt signal to be delivered on IO */
};

/*
* Track a single file's readahead state
/**
* struct file_ra_state - Track a file's readahead state.
* @start: Where the most recent readahead started.
* @size: Number of pages read in the most recent readahead.
* @async_size: Start next readahead when this many pages are left.
* @ra_pages: Maximum size of a readahead request.
* @mmap_miss: How many mmap accesses missed in the page cache.
* @prev_pos: The last byte in the most recent read request.
*/
struct file_ra_state {
pgoff_t start; /* where readahead started */
unsigned int size; /* # of readahead pages */
unsigned int async_size; /* do asynchronous readahead when
there are only # of pages ahead */

unsigned int ra_pages; /* Maximum readahead window */
unsigned int mmap_miss; /* Cache miss stat for mmap accesses */
loff_t prev_pos; /* Cache last read() position */
pgoff_t start;
unsigned int size;
unsigned int async_size;
unsigned int ra_pages;
unsigned int mmap_miss;
loff_t prev_pos;
};

/*
Expand Down

0 comments on commit c790fbf

Please sign in to comment.