Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3592896ybg; Sun, 20 Oct 2019 17:27:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1kXKFSecDMsOXHeKPgbqjvOiWQjxH83i74n2DmkNEl1smxtpiBa3ZbDyHSv96CW1+3/NQ X-Received: by 2002:a17:906:f75a:: with SMTP id jp26mr19458373ejb.191.1571617624738; Sun, 20 Oct 2019 17:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571617624; cv=none; d=google.com; s=arc-20160816; b=dxb+8aPg3WmcDBOyLBhm/VAdDKOAp/ujL7HK4x/ijZrrWSeH6m73Ya0HC0mOTtLsYi vNDbQonFk5htvskd5NGBBSuY4iPAqyWPmAPj01cHOQxLW5hv8uXXzEvq3nRA83sYuCAj WWfzRgIjTudIHQZ+F1OTpG50zR3BbjBhWRVh7fQekvw1yV+h4eUT1KAWIvPsU8A/fUvU Ww/JlIp/hcUNHHBZHHQ97EdSagle+uj2nSMyrp7/4Km5r/rMuwbYof9Ory1jcc999jAG kdf7Z9VVQbNBMj2WCD6gIy97gKq3jlCRbqgTXBMWeX3ZEN4QrJBY/p4ReOmwA/mZ2hP3 BIyQ== 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=hvJwzdZBNyhVdDiLwURcsW63fJtvFlN4VvgvNVSdYZs=; b=qOK0KLlBMaBXm4fkZQ8z4LDtKDYXEzJpeAbEuSeWkqhOuNa1rPETQibXzXVD+DTFtF KOj9LNlqz7KrmF9o8r24zArCHCICIeiBc/u1eG/kAgX7Jswlv19PWYPa7TOqldN7yrRu W1YNgxbnthBrLwxmmi7kH2OZZDdNoChb/c9VEQXjxBaPDYjIHBkGf/JUzqNgYa2FY64u 8TlIVoJuFQ85bFyiwdPnIQgdQ2+nhP+YXB5DXNyKIU5c+GgxbKQmvekpxlA+2buqAjzL qjAY7F5cm/twQrJB6EJEYiww8Vi02HDbc40IPEQf+nNGdsoibaX1JQphFQlVWT80CRdH BIsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si8240852edt.298.2019.10.20.17.26.30; Sun, 20 Oct 2019 17:27:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726610AbfJUA01 (ORCPT + 99 others); Sun, 20 Oct 2019 20:26:27 -0400 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:39633 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbfJUA00 (ORCPT ); Sun, 20 Oct 2019 20:26:26 -0400 Received: from dread.disaster.area (pa49-180-40-48.pa.nsw.optusnet.com.au [49.180.40.48]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id B1C8A3639AA; Mon, 21 Oct 2019 11:26:22 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1iMLWf-0002md-68; Mon, 21 Oct 2019 11:26:21 +1100 Date: Mon, 21 Oct 2019 11:26:21 +1100 From: Dave Chinner To: ira.weiny@intel.com Cc: linux-kernel@vger.kernel.org, Alexander Viro , "Darrick J. Wong" , Dan Williams , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/5] fs/xfs: Isolate the physical DAX flag from effective Message-ID: <20191021002621.GC8015@dread.disaster.area> References: <20191020155935.12297-1-ira.weiny@intel.com> <20191020155935.12297-3-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191020155935.12297-3-ira.weiny@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=y881pOMu+B+mZdf5UrsJdA==:117 a=y881pOMu+B+mZdf5UrsJdA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=XobE76Q3jBoA:10 a=QyXUC8HyAAAA:8 a=7-415B0cAAAA:8 a=SKUv1dWzumgnk67EJ3kA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sun, Oct 20, 2019 at 08:59:32AM -0700, ira.weiny@intel.com wrote: > From: Ira Weiny > > xfs_ioctl_setattr_dax_invalidate() currently checks if the DAX flag is > changing as a quick check. > > But the implementation mixes the physical (XFS_DIFLAG2_DAX) and > effective (S_DAX) DAX flags. More nuanced than that. The idea was that if the mount option was set, clearing the per-inode flag would override the mount option. i.e. the mount option sets the S_DAX flag at inode instantiation, so using FSSETXATTR to ensure the FS_XFLAG_DAX is not set would override the mount option setting, giving applications a way of guranteeing they aren't using DAX to access the data. So if the mount option is going to live on, I suspect that we want to keep this code as it stands. Cheers, Dave. -- Dave Chinner david@fromorbit.com