Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3010896pxk; Sun, 6 Sep 2020 23:49:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXL4yPGvwZTzieidvAigQHy4yDMkA9Fhf5Vu9+HXq2eLvFOJ3cmghX9dipt/a3Vw0bC/Rd X-Received: by 2002:a50:cdd1:: with SMTP id h17mr20374309edj.94.1599461343709; Sun, 06 Sep 2020 23:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599461343; cv=none; d=google.com; s=arc-20160816; b=0XErD9PmcI/fa/Ky3hMDPrxY9rFi1h65LSlSOM7824pWFbH0BZX4Raq8diz27Y3LI9 IsTMHZXX9IR2SEQuh+CTnXS9hyeGlZOoWKizGC2dqyNgF5gq/wYScZevVhmOGc44pZZy 56fAA9mMj+1PN2uiL1ewMbtVs9uobo3fxJVAQcrLRYKiN2JFEf59/AhGQQHspOsEVyGO aTJ/A5JmUvOtZ6Omg1d0/Xdol6VDoBttGuT0sceuKXTdmPc6lsbECsY1L37p1gGR2niW DIxHvBBtTN+FxuxINeIFRFUfQXy9qe33Ls1wAwRPN5RtKmk1hZ19KkG9x/VsVw8m4Ovo KM1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=t4/RqGlX5znLqcYQbtNTnkRstCnXwkV426PduE7ZsxI=; b=mmHnmfd+1nbnewZNuUVTvC7MES5+JpRZRMNLOatYBvCvP3jtDTcksWYx+i3yuJsNlP xgAwAk8aoKptrwHY9c4tzqs0acmzdQorpxBCwzYaQ3QCcsu2M6UxLPdYLNMj7fq48Evw EI7xBPTO1ZGiZwXpim3Vhe7HKg2CE/kccJTvWESWsE4/jLYEYAGteS93hS4dx7ixK9GH c+ZCNLV7NmzY6uBjUshr+DtlBZzNfm8jVYjhroZPW35a6NiYKiwrrxbMuMA7qgCFglGg 7qIprb4Avnp+hj9nRnvs8GoSu9XHmyq07IOuRqLGewgMWnJDllXy+D5OqxhFRtiaY7k0 J0eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 rh24si9381954ejb.283.2020.09.06.23.48.28; Sun, 06 Sep 2020 23:49:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726733AbgIGGsC (ORCPT + 99 others); Mon, 7 Sep 2020 02:48:02 -0400 Received: from verein.lst.de ([213.95.11.211]:47846 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbgIGGsC (ORCPT ); Mon, 7 Sep 2020 02:48:02 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5A1BB6736F; Mon, 7 Sep 2020 08:47:58 +0200 (CEST) Date: Mon, 7 Sep 2020 08:47:58 +0200 From: Christoph Hellwig To: Mikulas Patocka Cc: Linus Torvalds , Jan Kara , "Darrick J. Wong" , Dave Chinner , Jann Horn , Christoph Hellwig , Oleg Nesterov , Kirill Shutemov , Theodore Ts'o , Andrea Arcangeli , Matthew Wilcox , Andrew Morton , Dan Williams , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH 2/2] xfs: don't update mtime on COW faults Message-ID: <20200907064758.GA19384@lst.de> References: 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) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > +static bool > +xfs_is_write_fault( > + struct vm_fault *vmf) > +{ > + return vmf->flags & FAULT_FLAG_WRITE && vmf->vma->vm_flags & VM_SHARED; > +} This function does not look xfs specific at all. Why isn't it it in fs.h? While we're at it the name sounds rather generic, and there are no good comments. Maybe we just need to split FAULT_FLAG_WRITE into two and check those instead of such crazy workarounds?