Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1536419pxb; Thu, 4 Mar 2021 14:05:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQkGCIGCLtypF0C4K5tOII+ANtUrzS2X3OX2PAYVrG/xttJfr+7b4grrN9DnI8yTG9/bx0 X-Received: by 2002:a17:907:110c:: with SMTP id qu12mr6559810ejb.442.1614895535684; Thu, 04 Mar 2021 14:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614895535; cv=none; d=google.com; s=arc-20160816; b=eOYj4Ls41kuBIsTHPuNjxwYS/WhP9QstIWAhwfS6sRqGOdjmHkR6OguetBxFddZYzh p8YQmbOUxgLPrmU33IrGXb251lc+Ogu5Lf3O1F8KmNkUVxwCKJ5p2Hhs+i9MFf9Rg7s1 uaf9F+dUzjkp2+iOf7ie4swxFsQB9Gmi6pU66tWw3YJz/yq5VFT6jriq3U3MV+DFlpFT N1lxHQtdBTPw+ZJWlzO2f29+4RWDWJqXRTsqKuUPCXSjduC4fHHFWmzxFHcse5OLZzfR CSmERRp9Jd9vmoI0mq+okoJeZwGSZWqb9JQgQsvyw/Poe45OjPLFB45enZmSDD7cCFpk kK9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2OIFCyeKeavDyOO/cVhKGpb+4VSsZDgnrtudLsLfZAk=; b=Yz2Q+0W+r+yKURwNTHeZ//P1l58wWKdJkA8fNll9u4NEW2aIyCgFhKtnHY0rsFY1V5 YiZStqggXSMo/Y9uXCbQ2cHGwb6wyYZKvc7eAntsElCeZG/S/hgSq7v8fgmAn8HCX5Mf K41+NLGCCekIi/GBir9ltuug1fWi4aV9LqQzbGvMZyNCRDurFWD7HyN1QtzVhAIrYBql maZ2cbYZwms6RvReubP2KZHhtvcG3UxqwMcsjmwEtLzXwrUpyGydOLlsrww7t/7AV3zh MpCtYlphYIUIxypCnv0fliu28I2yUVKOPyrVibyjoj2eeM60iPUSlJSDZRUOMPli6WxD ZMEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si243774eji.719.2021.03.04.14.05.11; Thu, 04 Mar 2021 14:05:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351056AbhCCP0n (ORCPT + 99 others); Wed, 3 Mar 2021 10:26:43 -0500 Received: from verein.lst.de ([213.95.11.211]:36143 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350566AbhCCKrX (ORCPT ); Wed, 3 Mar 2021 05:47:23 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 5C59368B02; Wed, 3 Mar 2021 11:43:37 +0100 (CET) Date: Wed, 3 Mar 2021 11:43:36 +0100 From: Christoph Hellwig To: "ruansy.fnst@fujitsu.com" Cc: Christoph Hellwig , "linux-kernel@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "linux-fsdevel@vger.kernel.org" , "darrick.wong@oracle.com" , "dan.j.williams@intel.com" , "willy@infradead.org" , "jack@suse.cz" , "viro@zeniv.linux.org.uk" , "linux-btrfs@vger.kernel.org" , "ocfs2-devel@oss.oracle.com" , "david@fromorbit.com" , "rgoldwyn@suse.de" Subject: Re: [PATCH v2 09/10] fs/xfs: Handle CoW for fsdax write() path Message-ID: <20210303104336.GA20371@lst.de> References: <20210226002030.653855-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 03, 2021 at 09:57:48AM +0000, ruansy.fnst@fujitsu.com wrote: > > What is the advantage of the ioemap_end handler here? It adds another > > indirect funtion call to the fast path, so if we can avoid it, I'd > > rather do that. > > These code were in xfs_file_dax_write(). I moved them into the iomap_end > because the mmaped CoW need this. > > I know this is not so good, but I could not find another better way. Do you > have any ideas? mmaped copy is the copy_edge case? Maybe just use different iomap_ops for that case vs plain write?