From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 4F86029DF5 for ; Mon, 15 Feb 2016 17:44:16 -0600 (CST) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay2.corp.sgi.com (Postfix) with ESMTP id 3DE38304039 for ; Mon, 15 Feb 2016 15:44:16 -0800 (PST) Received: from sandeen.net (sandeen.net [63.231.237.45]) by cuda.sgi.com with ESMTP id J30zKMmcGveY55oi for ; Mon, 15 Feb 2016 15:44:14 -0800 (PST) Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id 4795563C5FF0 for ; Mon, 15 Feb 2016 17:44:14 -0600 (CST) Subject: Re: [PATCH 2/3] xfs: introduce per-inode DAX enablement References: <1455514346-15481-1-git-send-email-david@fromorbit.com> <1455514346-15481-3-git-send-email-david@fromorbit.com> From: Eric Sandeen Message-ID: <56C262CD.9030701@sandeen.net> Date: Mon, 15 Feb 2016 17:44:13 -0600 MIME-Version: 1.0 In-Reply-To: <1455514346-15481-3-git-send-email-david@fromorbit.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com On 2/14/16 11:32 PM, Dave Chinner wrote: > From: Dave Chinner > > Source kernel commit 58f88ca2df7270881de2034c8286233a89efe71c > > Rather than just being able to turn DAX on and off via a mount > option, some applications may only want to enable DAX for certain > performance critical files in a filesystem. > > This patch introduces a new inode flag to enable DAX in the v3 inode > di_flags2 field. It adds support for setting and clearing flags in > the di_flags2 field via the XFS_IOC_FSSETXATTR ioctl, and sets the > S_DAX inode flag appropriately when it is seen. > > When this flag is set on a directory, it acts as an "inherit flag". > That is, inodes created in the directory will automatically inherit > the on-disk inode DAX flag, enabling administrators to set up > directory heirarchies that automatically use DAX. Setting this flag > on an empty root directory will make the entire filesystem use DAX > by default. > > Signed-off-by: Dave Chinner > Signed-off-by: Dave Chinner Reviewed-by: Eric Sandeen > --- > libxfs/xfs_format.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h > index 967b1ef..7eae0a5 100644 > --- a/libxfs/xfs_format.h > +++ b/libxfs/xfs_format.h > @@ -1024,6 +1024,15 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev) > XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_FILESTREAM) > > /* > + * Values for di_flags2 These start by being exposed to userspace in the upper > + * 16 bits of the XFS_XFLAG_s range. > + */ > +#define XFS_DIFLAG2_DAX_BIT 0 /* use DAX for this inode */ > +#define XFS_DIFLAG2_DAX (1 << XFS_DIFLAG2_DAX_BIT) > + > +#define XFS_DIFLAG2_ANY (XFS_DIFLAG2_DAX) > + > +/* > * Inode number format: > * low inopblog bits - offset in block > * next agblklog bits - block number in ag > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs