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=ham 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 679C7C11D00 for ; Fri, 21 Feb 2020 03:27:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2257F20716 for ; Fri, 21 Feb 2020 03:27:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="GVE5JgGQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2257F20716 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C3C6C6B0005; Thu, 20 Feb 2020 22:27:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BEDB66B0006; Thu, 20 Feb 2020 22:27:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB5606B0007; Thu, 20 Feb 2020 22:27:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id 7E3376B0005 for ; Thu, 20 Feb 2020 22:27:06 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4398A181AEF1F for ; Fri, 21 Feb 2020 03:27:06 +0000 (UTC) X-FDA: 76512698052.06.rake90_5b096605d664e X-HE-Tag: rake90_5b096605d664e X-Filterd-Recvd-Size: 4007 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Feb 2020 03:27:05 +0000 (UTC) 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== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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