Skip to content

Commit c790fbf

Browse files
Matthew Wilcox (Oracle)dhowells
authored andcommitted
fs: Document file_ra_state
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
1 parent fcd9ae4 commit c790fbf

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

include/linux/fs.h

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -891,18 +891,22 @@ struct fown_struct {
891891
int signum; /* posix.1b rt signal to be delivered on IO */
892892
};
893893

894-
/*
895-
* Track a single file's readahead state
894+
/**
895+
* struct file_ra_state - Track a file's readahead state.
896+
* @start: Where the most recent readahead started.
897+
* @size: Number of pages read in the most recent readahead.
898+
* @async_size: Start next readahead when this many pages are left.
899+
* @ra_pages: Maximum size of a readahead request.
900+
* @mmap_miss: How many mmap accesses missed in the page cache.
901+
* @prev_pos: The last byte in the most recent read request.
896902
*/
897903
struct file_ra_state {
898-
pgoff_t start; /* where readahead started */
899-
unsigned int size; /* # of readahead pages */
900-
unsigned int async_size; /* do asynchronous readahead when
901-
there are only # of pages ahead */
902-
903-
unsigned int ra_pages; /* Maximum readahead window */
904-
unsigned int mmap_miss; /* Cache miss stat for mmap accesses */
905-
loff_t prev_pos; /* Cache last read() position */
904+
pgoff_t start;
905+
unsigned int size;
906+
unsigned int async_size;
907+
unsigned int ra_pages;
908+
unsigned int mmap_miss;
909+
loff_t prev_pos;
906910
};
907911

908912
/*

0 commit comments

Comments
 (0)