Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp412025pxu; Tue, 1 Dec 2020 14:38:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHbHJq+ODUyFWdocck1Pv/iO23+23eEp4OjXJ1SuC0WEnznWoz17jy/O2BZ91zNfaT1Kj3 X-Received: by 2002:a17:906:c289:: with SMTP id r9mr5054763ejz.311.1606862304787; Tue, 01 Dec 2020 14:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606862304; cv=none; d=google.com; s=arc-20160816; b=irbCfN2VjVff555kC/KywLbHsCJER2AdOSpYmh5kjleOzVg5Fwl65yYAR3CGvNPa7A HffEBgztP5PI2luzkYhkP4cxFxvaZQAXdwImGzHW7ViBFZ0xnvUFSWQlgD2Yw2hbHBcV dPd7yHOBydERDgWthuxAgbf3ABoPCcuKVFlFaGNvskNVHhvZQdoB2xDGt3/CTKKH2ufn 0toJiDnU64a1StGgB87p1XNUhE9jVuBDTEFU8Wu8255gz8olNBnpHF3LexETZKCLOUqv FY9ZCxJ1owkDjZmMo+YeWEKM6dlOYFrIcWHDGMv70NxVlkWvoGHKu9nFwwMbkTDdZtF/ DAtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=co5QENWtYqymE2c+LI6PUvj12KEALpH40fY7qPRAnFQ=; b=t3y6V9ZLf1U+3UggDA/RqGn0/NZnmA3hZfJiSn+EOyWjNXfXPhAhcO405zBh7sTdfY KKl9rnFp0g9TjRTr6LYODtYXQhcCq+2/eWu4Xr6ER+LzDE7Y0KCj2PFaV8AsnJtiZg/j Odpr6TxF9oG9hXIayyLD9EU7Ld3lIkv4Okx+qbk4Da/15e8KqJneVrm9oebH00ipLaeD B9SAhyxTTnEd+tnceQXr5ILzk1vOrm3IvSkQ4XaStZ4D/fIy6B+T39/Kj0VZjmIcrfN8 JFXGWy/0vf5ZA6hbbYaM4lu5F1IVQitrCvRkPwu5xDozAZBBietmuaZK8XsQtbQjL63J C9Bg== 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 dg28si780206edb.167.2020.12.01.14.38.01; Tue, 01 Dec 2020 14:38:24 -0800 (PST) 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 S1726873AbgLAW1Z (ORCPT + 99 others); Tue, 1 Dec 2020 17:27:25 -0500 Received: from sandeen.net ([63.231.237.45]:59158 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726921AbgLAW1Z (ORCPT ); Tue, 1 Dec 2020 17:27:25 -0500 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id 6BAEE1171F; Tue, 1 Dec 2020 16:26:28 -0600 (CST) To: Linus Torvalds Cc: Dave Chinner , "Darrick J. Wong" , Eric Sandeen , Miklos Szeredi , Ira Weiny , David Howells , linux-fsdevel , linux-man , Linux Kernel Mailing List , xfs , Ext4 Developers List , Xiaoli Feng References: <05a0f4fd-7f62-8fbc-378d-886ccd5b3f11@redhat.com> <20201201173905.GI143045@magnolia> <20201201205243.GK2842436@dread.disaster.area> <9ab51770-1917-fc05-ff57-7677f17b6e44@sandeen.net> From: Eric Sandeen Subject: Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems Message-ID: <15fd1754-371d-88ff-c60b-6635a2da0b13@sandeen.net> Date: Tue, 1 Dec 2020 16:26:43 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 12/1/20 4:12 PM, Linus Torvalds wrote: > On Tue, Dec 1, 2020 at 2:03 PM Eric Sandeen wrote: >> >> That's why I was keen to just add DAX unconditionally at this point, and if we want >> to invent/refine meanings for the mask, we can still try to do that? > > Oh Gods. Let's *not* make this some "random filesystem choice" where > now semantics depends on what some filesystem decided to do, and > different filesystems have very subtly different semantics. Well, I had hoped that refinement might start with the interface documentation, I'm certainly not suggesting every filesystem should go its own way. > This all screams "please keep this in the VFS layer" so that we at > least have _one_ place where these kinds of decisions are made. Making the "right decision" depends on what the mask actually means, I guess. Today we set a DAX attribute in statx which is not set in the mask. That seems clearly broken. We can either leave that as it is, set DAX in the mask for everyone in the VFS, or delegate that mask-setting task to the individual filesystems so that it reflects , probably "can this inode ever be in dax mode?" I honestly don't care if we keep setting the attribute itself in the VFS; if that's the right thing to do, that's fine. (If so, it seems like IS_IMMUTABLE -> STATX_ATTR_IMMUTABLE etc could be moved there, too.) -Eric