From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37A34C11D24 for ; Fri, 21 Feb 2020 03:27:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BFCE24656 for ; Fri, 21 Feb 2020 03:27:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="GVE5JgGQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729613AbgBUD1F (ORCPT ); Thu, 20 Feb 2020 22:27:05 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:10842 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729229AbgBUD1E (ORCPT ); Thu, 20 Feb 2020 22:27:04 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 20 Feb 2020 19:26:30 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 20 Feb 2020 19:27:03 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 20 Feb 2020 19:27:03 -0800 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 21 Feb 2020 03:27:03 +0000 Subject: Re: [PATCH v7 06/24] mm: Rename various 'offset' parameters to 'index' To: Matthew Wilcox , CC: , , , , , , , , References: <20200219210103.32400-1-willy@infradead.org> <20200219210103.32400-7-willy@infradead.org> From: John Hubbard X-Nvconfidentiality: public Message-ID: <110bd4a5-0d12-7f8e-0d5d-78869b3f9135@nvidia.com> Date: Thu, 20 Feb 2020 19:27:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200219210103.32400-7-willy@infradead.org> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1582255590; bh=owcb4CMNvaoIORlq5lNkIRvU5IPCuIJMoPXOl4x4Vi0=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=GVE5JgGQrgvZz6V3WcHAMb67LvTCiKjS8hKTk2B9obgdAVU0QHb0/YJxV39UHoes4 fTXr2Jtotj3X/Fwe/w/9iL/HOFWfI2kViUR6nyfJwvx8nqtqScXQ3n96GkcYB1wNPO XGPagBrK93GOX00pFiXiJHkA1qTPFqsROFjX2+5h+HL+PQ8ZjWDS/3ZuHc4z0dVP+h WtmdiPx3QGWa8NpWywZApZlnSwpXa0whA86w7R9jBhModR2G6pTCPMMywLXmz0jQhU Mq6qMUcVjmHdejFgFbiZFY8CM3ofmVhq2v/OrR1Fl6wAqwzwAWcR355R9KcDSaIEbJ Cl3cmTmb4JbpQ== Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 2/19/20 1:00 PM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > 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) > --- > 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