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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 2A7A9C2BA83 for ; Wed, 12 Feb 2020 08:17:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E125020714 for ; Wed, 12 Feb 2020 08:17:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Jk5E+XVm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E125020714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 653A46B0404; Wed, 12 Feb 2020 03:17:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 604836B0405; Wed, 12 Feb 2020 03:17:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51BA66B0406; Wed, 12 Feb 2020 03:17:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id 3710C6B0404 for ; Wed, 12 Feb 2020 03:17:48 -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 BD29A181AEF09 for ; Wed, 12 Feb 2020 08:17:47 +0000 (UTC) X-FDA: 76480771374.06.route43_4406822349059 X-HE-Tag: route43_4406822349059 X-Filterd-Recvd-Size: 2572 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 12 Feb 2020 08:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=MY0ydPqw5aZvHUFOaxpb4KlvnSqokiIiIOtel5Vm7Ok=; b=Jk5E+XVml8BqecXyM/pxcgm3ZL scQ/7t2VG4af0E0RFCcCK3OIUqUIFhtZRY+cKRMBVCIP5AXNITp3zqcLLb0Wv9wQBmHqabnvgR19s LCEk97HW9qWhy4RvU62aOQYb+acqAnKQ7H2iIW2WBKJZTz+7IZx+eZ0Y/1AEo1eXQMOKt91CPHF9/ aG/nrH73VV3LLjYbZBqw0kHaWflQC8Ftmf2xiciYXw6iHmho064778YPZPPmmlZM+98gOjknLxWWc YngzNbFEAJ+zsY7Dc4y1LlurrQBa85KwHVoQhshR1Cv/zPsBmi4h7++4Wba2YkJWS5fitINLhbhiE LT2r4iIQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1nDK-00079o-PK; Wed, 12 Feb 2020 08:17:42 +0000 Date: Wed, 12 Feb 2020 00:17:42 -0800 From: Christoph Hellwig To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 17/25] iomap: Support large pages in write paths Message-ID: <20200212081742.GE24497@infradead.org> References: <20200212041845.25879-1-willy@infradead.org> <20200212041845.25879-18-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200212041845.25879-18-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 Tue, Feb 11, 2020 at 08:18:37PM -0800, Matthew Wilcox wrote: > Also simplify the logic in iomap_do_writepage() for determining end of > file. > * ---------------------------------^------------------| > */ > offset = i_size_read(inode); > - end_index = offset >> PAGE_SHIFT; > - if (page->index < end_index) > - end_offset = (loff_t)(page->index + 1) << PAGE_SHIFT; > - else { > + end_offset = file_offset_of_next_page(page); > + > + if (end_offset > offset) { Nit: can you drop the empty line here? Maybe it is just a pet peeve of mine, but I hate empty line between a variable assignment, and a use that is directly related to it. Also it might be worth to preload this as a separate patch as it is a very nice but not completely obvious cleanup that deserves to stand out.