lkml.org 
[lkml]   [2020]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v7 06/24] mm: Rename various 'offset' parameters to 'index'
    From
    Date
    On 2/19/20 1:00 PM, Matthew Wilcox wrote:
    > From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
    >
    > The word 'offset' is used ambiguously to mean 'byte offset within
    > a page', 'byte offset from the start of the file' and 'page offset
    > from the start of the file'. Use 'index' to mean 'page offset
    > from the start of the file' throughout the readahead code.
    >
    > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    > ---
    > mm/readahead.c | 86 ++++++++++++++++++++++++--------------------------
    > 1 file changed, 42 insertions(+), 44 deletions(-)
    >
    > diff --git a/mm/readahead.c b/mm/readahead.c
    > index 6a9d99229bd6..096cf9020648 100644
    > --- a/mm/readahead.c
    > +++ b/mm/readahead.c
    > @@ -156,7 +156,7 @@ static void read_pages(struct readahead_control *rac, struct list_head *pages,
    > * We really don't want to intermingle reads and writes like that.
    > */
    > void __do_page_cache_readahead(struct address_space *mapping,
    > - struct file *filp, pgoff_t offset, unsigned long nr_to_read,
    > + struct file *filp, pgoff_t index, unsigned long nr_to_read,
    > unsigned long lookahead_size)


    One more tiny thing: seeing as how this patch is also changing "size" to "count",
    maybe it should also change lookahead_size to lookahead_count.


    thanks,
    --
    John Hubbard
    NVIDIA

    \
     
     \ /
      Last update: 2020-02-21 04:27    [W:4.106 / U:0.620 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site