Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp220046pxu; Tue, 1 Dec 2020 09:35:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuiqjl4bRE/emLPN/vyey9Ft1TI41LQyr+p635jBCYH2/ZMuDDGWG2toyixpi7F8KVSUUC X-Received: by 2002:ac2:484f:: with SMTP id 15mr1617624lfy.553.1606844105355; Tue, 01 Dec 2020 09:35:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606844105; cv=none; d=google.com; s=arc-20160816; b=L+pQEnUleKLdPYTfVOXnJTqNkCi7s7X/1oXpa/J2OhzgGNnk8/cLhUm0reFFOMnrnj mXz+a7KOb/eO4YxjYE806tSHzOyVh8A6pntRkc60SIxzYy1Buqvlvf2fampmAr8OuLkK ja8Kxib+5LynUsjCqB+zF0vs4+C2Clxwhz7tgE6Io79VIhY45M4+CJA2yui1EojEn0yt vpY4vxaYVgOPt4wDY46Vg2Kd7Ruf68SD/6D4F0mKAecjQL62383dZ6IN8AMr6lF0C7ro D/E5xhru+LqeTuFDaONvZ/NDC3D9YQKHB/ybx2yACji2iG5ccsgA32N9mnIW0RioCg8s lxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OrLZ2TcxMTzpayNZHbMFnpbSSUbuHHfyBH7rVwjavA8=; b=lEk6PIsJ6VghAvmRKm6l+ibzzikrknZIivFEsWGRYyFRsIqVvbBqqe34fj2Qx3LGen LrlhxWlXUBra+aRKStMLSdBO2K9qtsFWuulChuttFn04136vZB50o5AR5lh1GOFwb7+I Ozfhk5bgSMhQRRVLZDMDncMUNfWcOxhC+C/bZDCblEddN+5Uv6rwOrf53BaJl7GFykuw ci7aaA5k090mpleuDIXbBw9GHL3BuNGH+hjHk5OG6b/n9Tdp6s22UiP22MuxQNSMOYkE 1jA1ZYebX8p90191o7iLhy9N3t/+spdwGSG49IQKX7rdvdxTknD4Ekgqvq6NVH7TOGIv LTxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=J+y8I92p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec19si332794ejb.669.2020.12.01.09.34.42; Tue, 01 Dec 2020 09:35:05 -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; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=J+y8I92p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390881AbgLARdC (ORCPT + 99 others); Tue, 1 Dec 2020 12:33:02 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:59282 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387716AbgLARdC (ORCPT ); Tue, 1 Dec 2020 12:33:02 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B1HStdS174056; Tue, 1 Dec 2020 17:32:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=OrLZ2TcxMTzpayNZHbMFnpbSSUbuHHfyBH7rVwjavA8=; b=J+y8I92pWhV92YXtBuMCCHALqBR6koiFyuB/M/ui+E9bAweH0vn1phIlbT/Ffyv4REge +Gh0Hy/L1Jla9Jn3DxGQImGACLVOCA2aA7ZPpbD4xYfBOViC7XFzT+osNc0lm801FNim yq+I0QWENLrApN+SgCbFgzpBkkcT3lNRA6KrKKeuDwG3oOTYBpw/i5uoJyCtopvJ3kHP 3QV5a2pk1G06oAenVELhPimGqHSm5iXdFNyy/ntT7/5AKWNkHH2H/gKo+SsbMafw3FVf C46uLWlopqN1smpxui9Kv+1PXPwYUrbmDfOBv+RKVvwNPUoAl7IPUY+JEZWUqARxzm4U 3A== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 353egkktqm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 01 Dec 2020 17:32:16 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B1HQOVq175124; Tue, 1 Dec 2020 17:32:16 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 35404n5n2e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Dec 2020 17:32:16 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0B1HWF4n007040; Tue, 1 Dec 2020 17:32:15 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 Dec 2020 09:32:14 -0800 Date: Tue, 1 Dec 2020 09:32:13 -0800 From: "Darrick J. Wong" To: Eric Sandeen Cc: torvalds@linux-foundation.org, Miklos Szeredi , Ira Weiny , David Howells , linux-fsdevel@vger.kernel.org, linux-man@vger.kernel.org, linux-kernel@vger.kernel.org, xfs , linux-ext4@vger.kernel.org, Xiaoli Feng Subject: Re: [PATCH 1/2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT Message-ID: <20201201173213.GH143045@magnolia> References: <7027520f-7c79-087e-1d00-743bdefa1a1e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7027520f-7c79-087e-1d00-743bdefa1a1e@redhat.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9822 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 phishscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012010107 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9822 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 suspectscore=1 phishscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 priorityscore=1501 spamscore=0 impostorscore=0 clxscore=1011 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012010107 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Dec 01, 2020 at 10:57:11AM -0600, Eric Sandeen wrote: > STATX_ATTR_MOUNT_ROOT and STATX_ATTR_DAX got merged with the same value, > so one of them needs fixing. Move STATX_ATTR_DAX. > > While we're in here, clarify the value-matching scheme for some of the > attributes, and explain why the value for DAX does not match. > > Signed-off-by: Eric Sandeen > --- > include/uapi/linux/stat.h | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h > index 82cc58fe9368..9ad19eb9bbbf 100644 > --- a/include/uapi/linux/stat.h > +++ b/include/uapi/linux/stat.h > @@ -171,9 +171,10 @@ struct statx { > * be of use to ordinary userspace programs such as GUIs or ls rather than > * specialised tools. > * > - * Note that the flags marked [I] correspond to generic FS_IOC_FLAGS > + * Note that the flags marked [I] correspond to the FS_IOC_SETFLAGS flags > * semantically. Where possible, the numerical value is picked to correspond > - * also. > + * also. Note that the DAX attribute indicates that the inode is currently > + * DAX-enabled, not simply that the per-inode flag has been set. I don't really like using "DAX-enabled" to define "DAX attribute". How about cribbing from the statx manpage? "Note that the DAX attribute indicates that the file is in the CPU direct access state. It does not correspond to the per-inode flag that some filesystems support." > */ > #define STATX_ATTR_COMPRESSED 0x00000004 /* [I] File is compressed by the fs */ > #define STATX_ATTR_IMMUTABLE 0x00000010 /* [I] File is marked immutable */ > @@ -183,7 +184,7 @@ struct statx { > #define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */ > #define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */ > #define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */ > -#define STATX_ATTR_DAX 0x00002000 /* [I] File is DAX */ > +#define STATX_ATTR_DAX 0x00400000 /* File is currently DAX-enabled */ Why not use the next bit in the series (0x200000)? Did someone already claim it in for-next? --D > > > #endif /* _UAPI_LINUX_STAT_H */ > -- > 2.17.0 >