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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 295A3C07E95 for ; Mon, 19 Jul 2021 23:38:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 03A0B610F7 for ; Mon, 19 Jul 2021 23:38:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352914AbhGSW5U (ORCPT ); Mon, 19 Jul 2021 18:57:20 -0400 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:46293 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354249AbhGSVaq (ORCPT ); Mon, 19 Jul 2021 17:30:46 -0400 Received: from dread.disaster.area (pa49-181-34-10.pa.nsw.optusnet.com.au [49.181.34.10]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 608471045436; Tue, 20 Jul 2021 08:10:06 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1m5bSf-008Ug1-At; Tue, 20 Jul 2021 08:10:05 +1000 Date: Tue, 20 Jul 2021 08:10:05 +1000 From: Dave Chinner To: Christoph Hellwig Cc: "Darrick J. Wong" , Dan Williams , Matthew Wilcox , Andreas Gruenbacher , Shiyang Ruan , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, nvdimm@lists.linux.dev, cluster-devel@redhat.com Subject: Re: [PATCH 20/27] fsdax: switch dax_iomap_rw to use iomap_iter Message-ID: <20210719221005.GL664593@dread.disaster.area> References: <20210719103520.495450-1-hch@lst.de> <20210719103520.495450-21-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210719103520.495450-21-hch@lst.de> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=YKPhNiOx c=1 sm=1 tr=0 a=hdaoRb6WoHYrV466vVKEyw==:117 a=hdaoRb6WoHYrV466vVKEyw==:17 a=kj9zAlcOel0A:10 a=e_q4qTt1xDgA:10 a=7-415B0cAAAA:8 a=ptF0LWpzHeEXjmLxdvQA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Mon, Jul 19, 2021 at 12:35:13PM +0200, Christoph Hellwig wrote: > Switch the dax_iomap_rw implementation to use iomap_iter. > > Signed-off-by: Christoph Hellwig > --- > fs/dax.c | 49 ++++++++++++++++++++++++------------------------- > 1 file changed, 24 insertions(+), 25 deletions(-) > > diff --git a/fs/dax.c b/fs/dax.c > index 4d63040fd71f56..51da45301350a6 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -1103,20 +1103,21 @@ s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap) > return size; > } > > -static loff_t > -dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data, > - struct iomap *iomap, struct iomap *srcmap) > +static loff_t dax_iomap_iter(const struct iomap_iter *iomi, > + struct iov_iter *iter) At first I wondered "iomi? Strange name, why is this one-off name used?" and then I realised it's because this function also takes an struct iov_iter named "iter". That's going to cause confusion in the long run - iov_iter and iomap_iter both being generally named "iter", and then one or the other randomly changing when both are used in the same function. Would it be better to avoid any possible confusion simply by using "iomi" for all iomap_iter variables throughout the patchset from the start? That way nobody is going to confuse iov_iter with iomap_iter iteration variables and code that uses both types will naturally have different, well known names... Cheers, Dave. -- Dave Chinner david@fromorbit.com