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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 9B4ACC07E9B for ; Tue, 20 Jul 2021 07:01:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7649461164 for ; Tue, 20 Jul 2021 07:01:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239433AbhGTGVG (ORCPT ); Tue, 20 Jul 2021 02:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243185AbhGTGUG (ORCPT ); Tue, 20 Jul 2021 02:20:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 437A4C061574; Tue, 20 Jul 2021 00:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=ewfvvuAfym/iwGWCipSDLSGypAtNWJ0fgldgA5lp580=; b=ThWqMJB9PW1zFusqK+Hfh5cc1y kkTgkvixxPOP5NQiA3+OYc+e14Vl6r7vhU+a2GTSMx8to/OEv1als32UFJa+3t+HM0iD8ZfGp5Sb7 Oy02JmuqKNMxTiJC+N0r8DDolh2Cw9y6Bm87JptEcJqYjoVLy3hf1NacUfoi9qlBAsQAzGFY0ScPZ 4MRRSncPYeLT2i0R3dkD6XGkw8DYTIQZUmoHUht8PG8SPClbR4CWbNhqV50qGOv4MiGUxQgLsMDsD V26ZEI8oYZzWockMjW2ga2uhi9wy4ekzOEC2ZgpkfLne10qDb9b9EUe4lDjHOqTcRtW8zWQ7T9Ojx S1qbAsVw==; Received: from [2001:4bb8:193:7660:5612:5e3c:ba3d:2b3c] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5jjG-007qkb-GK; Tue, 20 Jul 2021 06:59:55 +0000 Date: Tue, 20 Jul 2021 08:59:45 +0200 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, "Darrick J . Wong" Subject: Re: [PATCH v15 09/17] iomap: Use folio offsets instead of page offsets Message-ID: References: <20210719184001.1750630-1-willy@infradead.org> <20210719184001.1750630-10-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210719184001.1750630-10-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org > + size_t poff = offset_in_folio(folio, *pos); > + size_t plen = min_t(loff_t, folio_size(folio) - poff, length); These variables are a little misnamed now. But I'm not sure what a better name would be. > + size_t off = (page - &folio->page) * PAGE_SIZE + > + bvec->bv_offset; Another use case for the helper I suggested earlier. Otherwise looks good: Reviewed-by: Christoph Hellwig