Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp370755pxu; Thu, 26 Nov 2020 00:18:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7boXePwnWFqjIaDS79R+k1KMm623S4FRZyneA7JOeKzs6QWbgIdTBSlhGsSXKUlBLOGS9 X-Received: by 2002:a17:906:e18:: with SMTP id l24mr79094eji.434.1606378708521; Thu, 26 Nov 2020 00:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606378708; cv=none; d=google.com; s=arc-20160816; b=BeeXc1ID7hCIlpFHvGZ9B/YB88pf8uEueGnSe99AYC8eRvWWsU0aACW06MxqVwngMV uOAo1LXYgBpK0gXI7wDZweQ5Y/U/2lOB8lDnN5Dm8Pp8QOjpLJlmP2TJlFz72Z3KZ9Y9 azklwq7y5UF6ki4yOOH9rObPMQG7APXa2cTxYWpCwk9ssVuMRp4Bc/mfB9vaWuPZiEUf eWoiBueMx5fl2azQ3DKrI7jhBo6h9ZmlVuzgMD1qj/2itcToKaPmla9gfKZctrFskcy4 rfiv+XzvJcy7o756xgJWsToBqKF4hhVOhnfkB56AiZzuXle2BFxJUdttdJQodZZ5hJZK 5I9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ul7l8NTuGyp3MPqaSRmckdYGCH2RD65M+GA28ibecYo=; b=r9fyqdGTVVKwAWcW9Lw+di20ybfFlZmMbft0V9p9iKcLMDnL8oLw2CYqxuLwq3Z+dC HPRxFxqvprb1HfcryPftudO8uzwUyqmsUJSp+2zwTcV1GG/lB1pNk61dXVdk4EWoZtyj 4KklBdoO3Cvd4nYlEVAipesNN+ANFjxUQ/a45pBoi7e4n9HMNAZECBSe1O0QGgCa1QjA DySdsJfrmycDEqCfK99iwIpqP05rxMsTKfsyHUXFVvdEZ85uJ5wdjZsaywMBfwwktWck L10ligPKRv5xsyUb8PoUj5K4KsOtNCZGHjkteJlvWSHVBTWuUGZNSAhyxEZjCHHlpPOi +ajg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=bZp8t3ml; 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 c1si2629811edx.275.2020.11.26.00.17.51; Thu, 26 Nov 2020 00:18:28 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=bZp8t3ml; 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 S1730302AbgKYUob (ORCPT + 99 others); Wed, 25 Nov 2020 15:44:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730275AbgKYUoa (ORCPT ); Wed, 25 Nov 2020 15:44:30 -0500 Received: from mail-vk1-xa2b.google.com (mail-vk1-xa2b.google.com [IPv6:2607:f8b0:4864:20::a2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C672C061A4F for ; Wed, 25 Nov 2020 12:44:30 -0800 (PST) Received: by mail-vk1-xa2b.google.com with SMTP id v185so794953vkf.8 for ; Wed, 25 Nov 2020 12:44:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ul7l8NTuGyp3MPqaSRmckdYGCH2RD65M+GA28ibecYo=; b=bZp8t3mlmVlKUf+27Fr2mLeI6FfPLIu/o9LyNnM9kV27HgQX2QIk0++Eo1+hicCLMY qFS5UAN7drXTl/G5iUESSLM4fHF6JTHfeydKM52AHPFxbO++BHrXv8X61O7uaL0Lzf5q JvuUbfyl8EuDOd305QPGWj6rS0sNtxI1Oow90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ul7l8NTuGyp3MPqaSRmckdYGCH2RD65M+GA28ibecYo=; b=jiY8XljtxcqxZp5YMhyVEqHHgD4gEcWaokA4HCaMBvI2KbjXURwm9TrLDeOXE1l1AW wJpoB1CFvthObdhy01ceU8XLrz1fGqzulzfM4guCE6VSiCPwOpkTkpLIh+h+epkHGEBm 7ELQkNR7X+yrqg0P+l8pHYv0osTeHh/ZvQUJ3mbcrVTjLggbaFAP7NnGmrdZwQHvpxgJ bs/5JN4vMQz9Q3P91IkIe8SOu2i0FdkqMrc5MF/zzPJ+IxGgpyolpLfJ2czRE4eDe5pe FCdSMXpJluZScUEsHPr33u0suce2RUHVjbUplPb5EBxcS6joJ++SCYtNfRIPTej8wosz mVdQ== X-Gm-Message-State: AOAM531iSaQly/G611ysL/XKrhz/TjqzicXk8L9OEr15zknSGVYdQklN lqPwCbyEPhZ2c1e3IEtLmMnAIDwgWuIiEy2fIRDiTA== X-Received: by 2002:a1f:e7c2:: with SMTP id e185mr3732205vkh.23.1606337069449; Wed, 25 Nov 2020 12:44:29 -0800 (PST) MIME-Version: 1.0 References: <1927370.1606323014@warthog.procyon.org.uk> In-Reply-To: From: Miklos Szeredi Date: Wed, 25 Nov 2020 21:44:18 +0100 Message-ID: Subject: Re: UAPI value collision: STATX_ATTR_MOUNT_ROOT vs STATX_ATTR_DAX To: Eric Sandeen Cc: David Howells , Linus Torvalds , Miklos Szeredi , Ira Weiny , linux-fsdevel@vger.kernel.org, linux-man , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Related to this, nothing sets STATX_ATTR_DAX into statx->attributes_mask, > anywhere in the kernel. > > The flag is set into statx->attributes in vfs_getattr_nosec(), but that > does not know whether the particular filesystem under query supports dax > or not. > > This is related to my other email about exactly what attributes_mask > means, so should STATX_ATTR_DAX be set in statx->attributes_mask only > in the filesystems that support dax? > > (And should that be done only if CONFIG_DAX is turned on, etc?) I think the mask/flag combinations should mean: mask:off, flag:off -> value unknown mask:off, flag:on -> N/A mask:on, flag:off -> value is off mask:on, flag:on -> value is on So mask should be off iff STATX_ATTR_DAX will not be set even if DAX is enabled on a particular inode (such as on an old kernel not supporting STATX_ATTR_DAX). Thanks, Miklos