From patchwork Tue Apr 14 04:00:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270107 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491Wyf6JpBz9sT4 for ; Tue, 14 Apr 2020 14:02:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbgDNEAq (ORCPT ); Tue, 14 Apr 2020 00:00:46 -0400 Received: from mga05.intel.com ([192.55.52.43]:10159 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725969AbgDNEAp (ORCPT ); Tue, 14 Apr 2020 00:00:45 -0400 IronPort-SDR: n7qG6CpYfVz+IpBVBF5k1pcixAsUCzTY5plhvl4eNR7cW/5KEeYSoARzvmOqhyfuwYStarItTL dZ6ZEb0IGAiw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:44 -0700 IronPort-SDR: wzMZlJ/Q19YijhjzIs2z3E9yo9di0OJtxkis751KDV6ZLBOGaD4iBjotn+5V1BIlvIgfF2vWpq 0O3Th7MwCjPA== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="454432511" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:44 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 1/8] fs/ext4: Narrow scope of DAX check in setflags Date: Mon, 13 Apr 2020 21:00:23 -0700 Message-Id: <20200414040030.1802884-2-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny When preventing DAX and journaling on an inode. Use the effective DAX check rather than the mount option. This will be required to support per inode DAX flags. Signed-off-by: Ira Weiny Reviewed-by: Jan Kara --- fs/ext4/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index a0ec750018dd..ee3401a32e79 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -405,9 +405,9 @@ static int ext4_ioctl_setflags(struct inode *inode, if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) { /* * Changes to the journaling mode can cause unsafe changes to - * S_DAX if we are using the DAX mount option. + * S_DAX if the inode is DAX */ - if (test_opt(inode->i_sb, DAX)) { + if (IS_DAX(inode)) { err = -EBUSY; goto flags_out; } From patchwork Tue Apr 14 04:00:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270108 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491Wyj521Hz9sT0 for ; Tue, 14 Apr 2020 14:02:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405042AbgDNECD (ORCPT ); Tue, 14 Apr 2020 00:02:03 -0400 Received: from mga09.intel.com ([134.134.136.24]:28534 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726058AbgDNEAq (ORCPT ); Tue, 14 Apr 2020 00:00:46 -0400 IronPort-SDR: ArIqqU4UwnUEfs+D7gGtqAo/3RiSGuaf4RddB1a9ZiMMvkoGA3IXAAdz9QqkanDO+MoydGHqs9 7NpqE3YF1wbw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:46 -0700 IronPort-SDR: 3l/OIIHFT9+UJIHE/5rewB+qP+VXE3Bq53SDzxfibKMzFZVQELzhbwmSjAZVmAF/RTu/G9Qpgy CrLHCUnu0cAw== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="298588252" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:45 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 2/8] fs/ext4: Disallow verity if inode is DAX Date: Mon, 13 Apr 2020 21:00:24 -0700 Message-Id: <20200414040030.1802884-3-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny Verity and DAX are incompatible. Changing the DAX mode due to a verity flag change is wrong without a corresponding address_space_operations update. Make the 2 options mutually exclusive by returning an error if DAX was set first. (Setting DAX is already disabled if Verity is set first.) Signed-off-by: Ira Weiny Reviewed-by: Jan Kara --- fs/ext4/verity.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c index dc5ec724d889..ce3f9a198d3b 100644 --- a/fs/ext4/verity.c +++ b/fs/ext4/verity.c @@ -113,6 +113,9 @@ static int ext4_begin_enable_verity(struct file *filp) handle_t *handle; int err; + if (WARN_ON_ONCE(IS_DAX(inode))) + return -EINVAL; + if (ext4_verity_in_progress(inode)) return -EBUSY; From patchwork Tue Apr 14 04:00:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270105 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491WyF2CDlz9sSG for ; Tue, 14 Apr 2020 14:01:41 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405014AbgDNEBj (ORCPT ); Tue, 14 Apr 2020 00:01:39 -0400 Received: from mga18.intel.com ([134.134.136.126]:61616 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726093AbgDNEAs (ORCPT ); Tue, 14 Apr 2020 00:00:48 -0400 IronPort-SDR: +QZ6YAMwmEC5weDal5VlXOA3YbM7BAz7YutOeYNNIMDPtXzRdNnm1MOBrgAAf+aPRaqgtTL2Hj DcBtwuIDebuA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:47 -0700 IronPort-SDR: /vezDxyYNg30j1gO5/hvVLA4z6VaporjKFteFDpq7AIxmDSuWr+A+ECKUegOUqtdyh42rSGGuH fY3mM13b9f2g== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="241859904" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:46 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 3/8] fs/ext4: Disallow encryption if inode is DAX Date: Mon, 13 Apr 2020 21:00:25 -0700 Message-Id: <20200414040030.1802884-4-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny Encryption and DAX are incompatible. Changing the DAX mode due to a change in Encryption mode is wrong without a corresponding address_space_operations update. Make the 2 options mutually exclusive by returning an error if DAX was set first. Signed-off-by: Ira Weiny --- fs/ext4/super.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0c7c4adb664e..b14863058115 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1325,7 +1325,7 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len, if (inode->i_ino == EXT4_ROOT_INO) return -EPERM; - if (WARN_ON_ONCE(IS_DAX(inode) && i_size_read(inode))) + if (WARN_ON_ONCE(IS_DAX(inode))) return -EINVAL; res = ext4_convert_inline_data(inode); @@ -1349,10 +1349,6 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len, ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT); ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); - /* - * Update inode->i_flags - S_ENCRYPTED will be enabled, - * S_DAX may be disabled - */ ext4_set_inode_flags(inode); } return res; @@ -1376,10 +1372,6 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len, ctx, len, 0); if (!res) { ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT); - /* - * Update inode->i_flags - S_ENCRYPTED will be enabled, - * S_DAX may be disabled - */ ext4_set_inode_flags(inode); res = ext4_mark_inode_dirty(handle, inode); if (res) From patchwork Tue Apr 14 04:00:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270101 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491WxP3l6fz9sSt for ; Tue, 14 Apr 2020 14:00:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726310AbgDNEAw (ORCPT ); Tue, 14 Apr 2020 00:00:52 -0400 Received: from mga18.intel.com ([134.134.136.126]:61620 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbgDNEAt (ORCPT ); Tue, 14 Apr 2020 00:00:49 -0400 IronPort-SDR: XyLorU2JeoyBTcb/AQSOJDnxL6LgkYXVzgiuNkyUTgESD8N/ENFU8qdm1SjazDwa7pXo16gHvP JPw2OgFj6Kmg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:48 -0700 IronPort-SDR: yVsi5uFMne5a2eU8Zb7MpKnoTwGjXNaPvof3XWsBiRvZNOvl4z4N+5Gps1nNIncN1rdBNAK8g4 FNS97a95+YKw== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="271278106" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:48 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 4/8] fs/ext4: Introduce DAX inode flag Date: Mon, 13 Apr 2020 21:00:26 -0700 Message-Id: <20200414040030.1802884-5-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny Add a flag to preserve FS_XFLAG_DAX in the ext4 inode. Set the flag to be user visible and changeable. Set the flag to be inherited. Allow applications to change the flag at any time. Finally, on regular files, flag the inode to not be cached to facilitate changing S_DAX on the next creation of the inode. Signed-off-by: Ira Weiny --- fs/ext4/ext4.h | 13 +++++++++---- fs/ext4/ioctl.c | 21 ++++++++++++++++++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 61b37a052052..434021fcec88 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -415,13 +415,16 @@ struct flex_groups { #define EXT4_VERITY_FL 0x00100000 /* Verity protected inode */ #define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */ #define EXT4_EOFBLOCKS_FL 0x00400000 /* Blocks allocated beyond EOF */ + +#define EXT4_DAX_FL 0x00800000 /* Inode is DAX */ + #define EXT4_INLINE_DATA_FL 0x10000000 /* Inode has inline data. */ #define EXT4_PROJINHERIT_FL 0x20000000 /* Create with parents projid */ #define EXT4_CASEFOLD_FL 0x40000000 /* Casefolded file */ #define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */ -#define EXT4_FL_USER_VISIBLE 0x705BDFFF /* User visible flags */ -#define EXT4_FL_USER_MODIFIABLE 0x604BC0FF /* User modifiable flags */ +#define EXT4_FL_USER_VISIBLE 0x70DBDFFF /* User visible flags */ +#define EXT4_FL_USER_MODIFIABLE 0x60CBC0FF /* User modifiable flags */ /* Flags we can manipulate with through EXT4_IOC_FSSETXATTR */ #define EXT4_FL_XFLAG_VISIBLE (EXT4_SYNC_FL | \ @@ -429,14 +432,16 @@ struct flex_groups { EXT4_APPEND_FL | \ EXT4_NODUMP_FL | \ EXT4_NOATIME_FL | \ - EXT4_PROJINHERIT_FL) + EXT4_PROJINHERIT_FL | \ + EXT4_DAX_FL) /* Flags that should be inherited by new inodes from their parent. */ #define EXT4_FL_INHERITED (EXT4_SECRM_FL | EXT4_UNRM_FL | EXT4_COMPR_FL |\ EXT4_SYNC_FL | EXT4_NODUMP_FL | EXT4_NOATIME_FL |\ EXT4_NOCOMPR_FL | EXT4_JOURNAL_DATA_FL |\ EXT4_NOTAIL_FL | EXT4_DIRSYNC_FL |\ - EXT4_PROJINHERIT_FL | EXT4_CASEFOLD_FL) + EXT4_PROJINHERIT_FL | EXT4_CASEFOLD_FL |\ + EXT4_DAX_FL) /* Flags that are appropriate for regular files (all but dir-specific ones). */ #define EXT4_REG_FLMASK (~(EXT4_DIRSYNC_FL | EXT4_TOPDIR_FL | EXT4_CASEFOLD_FL |\ diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index ee3401a32e79..ca07d5086f03 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -539,12 +539,15 @@ static inline __u32 ext4_iflags_to_xflags(unsigned long iflags) xflags |= FS_XFLAG_NOATIME; if (iflags & EXT4_PROJINHERIT_FL) xflags |= FS_XFLAG_PROJINHERIT; + if (iflags & EXT4_DAX_FL) + xflags |= FS_XFLAG_DAX; return xflags; } #define EXT4_SUPPORTED_FS_XFLAGS (FS_XFLAG_SYNC | FS_XFLAG_IMMUTABLE | \ FS_XFLAG_APPEND | FS_XFLAG_NODUMP | \ - FS_XFLAG_NOATIME | FS_XFLAG_PROJINHERIT) + FS_XFLAG_NOATIME | FS_XFLAG_PROJINHERIT | \ + FS_XFLAG_DAX) /* Transfer xflags flags to internal */ static inline unsigned long ext4_xflags_to_iflags(__u32 xflags) @@ -563,6 +566,8 @@ static inline unsigned long ext4_xflags_to_iflags(__u32 xflags) iflags |= EXT4_NOATIME_FL; if (xflags & FS_XFLAG_PROJINHERIT) iflags |= EXT4_PROJINHERIT_FL; + if (xflags & FS_XFLAG_DAX) + iflags |= EXT4_DAX_FL; return iflags; } @@ -813,6 +818,17 @@ static int ext4_ioctl_get_es_cache(struct file *filp, unsigned long arg) return error; } +static void ext4_dax_dontcache(struct inode *inode, unsigned int flags) +{ + struct ext4_inode_info *ei = EXT4_I(inode); + + if (S_ISDIR(inode->i_mode)) + return; + + if ((ei->i_flags ^ flags) == EXT4_DAX_FL) + inode->i_state |= I_DONTCACHE; +} + long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { struct inode *inode = file_inode(filp); @@ -1273,6 +1289,9 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) return err; inode_lock(inode); + + ext4_dax_dontcache(inode, flags); + ext4_fill_fsxattr(inode, &old_fa); err = vfs_ioc_fssetxattr_check(inode, &old_fa, &fa); if (err) From patchwork Tue Apr 14 04:00:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270106 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491WyY6QYGz9sT0 for ; Tue, 14 Apr 2020 14:01:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405007AbgDNEBh (ORCPT ); Tue, 14 Apr 2020 00:01:37 -0400 Received: from mga09.intel.com ([134.134.136.24]:28534 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgDNEAv (ORCPT ); Tue, 14 Apr 2020 00:00:51 -0400 IronPort-SDR: e4rkJAwdg3ZInutHoJh53ZH7Iw3N5W8T0h//4fzqo17vBhKxDpFJzfCWVLl1VQ3PLfnY9G2MYh Oti6t8ntROOA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:50 -0700 IronPort-SDR: 2H6ZBl4aJBt3r1iHe+xnzTEJdzxLwhuBNnKFF2QrVz6sHR/HpS0UCmTvd086rot3zvUMlz0L6A cQ8/Slv4nwvQ== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="243709788" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:49 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 5/8] fs/ext4: Make DAX mount option a tri-state Date: Mon, 13 Apr 2020 21:00:27 -0700 Message-Id: <20200414040030.1802884-6-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny We add 'always', 'never', and 'inode' (default). '-o dax' continue to operate the same. Specifically we introduce a 2nd DAX mount flag EXT4_MOUNT_NODAX and set it and EXT4_MOUNT_DAX appropriately. We also force EXT4_MOUNT_NODAX if !CONFIG_FS_DAX. https://lore.kernel.org/lkml/20200405061945.GA94792@iweiny-DESK2.sc.intel.com/ Signed-off-by: Ira Weiny --- fs/ext4/ext4.h | 1 + fs/ext4/super.c | 43 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 434021fcec88..aadf33d5b37d 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1174,6 +1174,7 @@ struct ext4_inode_info { blocks */ #define EXT4_MOUNT2_HURD_COMPAT 0x00000004 /* Support HURD-castrated file systems */ +#define EXT4_MOUNT2_NODAX 0x00000008 /* Do not allow Direct Access */ #define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM 0x00000008 /* User explicitly specified journal checksum */ diff --git a/fs/ext4/super.c b/fs/ext4/super.c index b14863058115..0175fbfeb2ea 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1510,6 +1510,7 @@ enum { Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota, Opt_noquota, Opt_barrier, Opt_nobarrier, Opt_err, Opt_usrquota, Opt_grpquota, Opt_prjquota, Opt_i_version, Opt_dax, + Opt_dax_str, Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_warn_on_error, Opt_nowarn_on_error, Opt_mblk_io_submit, Opt_lazytime, Opt_nolazytime, Opt_debug_want_extra_isize, @@ -1575,6 +1576,7 @@ static const match_table_t tokens = { {Opt_barrier, "barrier"}, {Opt_nobarrier, "nobarrier"}, {Opt_i_version, "i_version"}, + {Opt_dax_str, "dax=%s"}, {Opt_dax, "dax"}, {Opt_stripe, "stripe=%u"}, {Opt_delalloc, "delalloc"}, @@ -1772,6 +1774,7 @@ static const struct mount_opts { {Opt_min_batch_time, 0, MOPT_GTE0}, {Opt_inode_readahead_blks, 0, MOPT_GTE0}, {Opt_init_itable, 0, MOPT_GTE0}, + {Opt_dax_str, 0, MOPT_STRING}, {Opt_dax, EXT4_MOUNT_DAX, MOPT_SET}, {Opt_stripe, 0, MOPT_GTE0}, {Opt_resuid, 0, MOPT_GTE0}, @@ -2081,13 +2084,32 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token, } sbi->s_jquota_fmt = m->mount_opt; #endif - } else if (token == Opt_dax) { + } else if (token == Opt_dax || token == Opt_dax_str) { #ifdef CONFIG_FS_DAX - ext4_msg(sb, KERN_WARNING, - "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); - sbi->s_mount_opt |= m->mount_opt; + char *tmp = match_strdup(&args[0]); + + if (!tmp || !strcmp(tmp, "always")) { + ext4_msg(sb, KERN_WARNING, + "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); + sbi->s_mount_opt |= EXT4_MOUNT_DAX; + sbi->s_mount_opt2 &= ~EXT4_MOUNT2_NODAX; + } else if (!strcmp(tmp, "never")) { + sbi->s_mount_opt2 |= EXT4_MOUNT2_NODAX; + sbi->s_mount_opt &= ~EXT4_MOUNT_DAX; + } else if (!strcmp(tmp, "inode")) { + sbi->s_mount_opt &= ~EXT4_MOUNT_DAX; + sbi->s_mount_opt2 &= ~EXT4_MOUNT2_NODAX; + } else { + ext4_msg(sb, KERN_WARNING, "DAX invalid option."); + kfree(tmp); + return -1; + } + + kfree(tmp); #else ext4_msg(sb, KERN_INFO, "dax option not supported"); + sbi->s_mount_opt2 |= EXT4_MOUNT2_NODAX; + sbi->s_mount_opt &= ~EXT4_MOUNT_DAX; return -1; #endif } else if (token == Opt_data_err_abort) { @@ -2303,6 +2325,13 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb, if (DUMMY_ENCRYPTION_ENABLED(sbi)) SEQ_OPTS_PUTS("test_dummy_encryption"); + if (test_opt2(sb, NODAX)) + SEQ_OPTS_PUTS("dax=never"); + else if (test_opt(sb, DAX)) + SEQ_OPTS_PUTS("dax=always"); + else + SEQ_OPTS_PUTS("dax=inode"); + ext4_show_quota_options(seq, sb); return 0; } @@ -5424,6 +5453,12 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) sbi->s_mount_opt ^= EXT4_MOUNT_DAX; } + if ((sbi->s_mount_opt2 ^ old_opts.s_mount_opt2) & EXT4_MOUNT2_NODAX) { + ext4_msg(sb, KERN_WARNING, "warning: refusing change of " + "non-dax flag with busy inodes while remounting"); + sbi->s_mount_opt2 ^= EXT4_MOUNT2_NODAX; + } + if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) ext4_abort(sb, "Abort forced by user"); From patchwork Tue Apr 14 04:00:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270104 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491Wy22CTWz9sT1 for ; Tue, 14 Apr 2020 14:01:30 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726351AbgDNEA4 (ORCPT ); Tue, 14 Apr 2020 00:00:56 -0400 Received: from mga07.intel.com ([134.134.136.100]:37182 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726287AbgDNEAw (ORCPT ); Tue, 14 Apr 2020 00:00:52 -0400 IronPort-SDR: cHEbihgZ+Ty2KFlfTsJy4kq1FsiwwACnYDkThUVqctBDwog/2TbJ6TS+PDsRqNKWfKxP8XehI9 mQhAFeKtVJHg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:51 -0700 IronPort-SDR: a6EYxe7pLy+VgJqH3HoxkqokuL0Zgh/t1VNeCYkbSnANVr6Y9TaeJmQ3HAPgTRnLqkCtpJcYxK ImEYNJS2ZNaA== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="288089345" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:50 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 6/8] fs/ext4: Update ext4_should_use_dax() Date: Mon, 13 Apr 2020 21:00:28 -0700 Message-Id: <20200414040030.1802884-7-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny Change the logic of ext4_should_use_dax() to support using the inode dax flag OR the overriding tri-state mount option. While we are at it change the function to ext4_enable_dax() as this better reflects the ask. Signed-off-by: Ira Weiny --- fs/ext4/inode.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index fa0ff78dc033..e9d582e516bc 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4383,9 +4383,11 @@ int ext4_get_inode_loc(struct inode *inode, struct ext4_iloc *iloc) !ext4_test_inode_state(inode, EXT4_STATE_XATTR)); } -static bool ext4_should_use_dax(struct inode *inode) +static bool ext4_enable_dax(struct inode *inode) { - if (!test_opt(inode->i_sb, DAX)) + unsigned int flags = EXT4_I(inode)->i_flags; + + if (test_opt2(inode->i_sb, NODAX)) return false; if (!S_ISREG(inode->i_mode)) return false; @@ -4397,7 +4399,13 @@ static bool ext4_should_use_dax(struct inode *inode) return false; if (ext4_test_inode_flag(inode, EXT4_INODE_VERITY)) return false; - return true; + if (!bdev_dax_supported(inode->i_sb->s_bdev, + inode->i_sb->s_blocksize)) + return false; + if (test_opt(inode->i_sb, DAX)) + return true; + + return (flags & EXT4_DAX_FL) == EXT4_DAX_FL; } void ext4_set_inode_flags(struct inode *inode) @@ -4415,7 +4423,7 @@ void ext4_set_inode_flags(struct inode *inode) new_fl |= S_NOATIME; if (flags & EXT4_DIRSYNC_FL) new_fl |= S_DIRSYNC; - if (ext4_should_use_dax(inode)) + if (ext4_enable_dax(inode)) new_fl |= S_DAX; if (flags & EXT4_ENCRYPT_FL) new_fl |= S_ENCRYPTED; From patchwork Tue Apr 14 04:00:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270102 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491WxX3gQvz9sSG for ; Tue, 14 Apr 2020 14:01:04 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgDNEBB (ORCPT ); Tue, 14 Apr 2020 00:01:01 -0400 Received: from mga06.intel.com ([134.134.136.31]:50669 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbgDNEA6 (ORCPT ); Tue, 14 Apr 2020 00:00:58 -0400 IronPort-SDR: TzKqGIGIxIXWzYZdCOFzc6bllplW3QZaNnD/5QgdHI9gKbtMaxANFsgAi2GaVHhgaQiP39Ugds bvQPTyIFcmzA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:54 -0700 IronPort-SDR: 11MaLzUFtLlYlq1VFTGosvq+vPNuERq06CTUwZP98hldIDbBqsnJPLi59xFBdy33batTh3EPG4 +itqV1eQwJeg== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="269266869" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:53 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 7/8] fs/ext4: Only change S_DAX on inode load Date: Mon, 13 Apr 2020 21:00:29 -0700 Message-Id: <20200414040030.1802884-8-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny To prevent complications with in memory inodes we only set S_DAX on inode load. FS_XFLAG_DAX can be changed at any time and S_DAX will change after inode eviction and reload. Add init bool to ext4_set_inode_flags() to indicate if the inode is being newly initialized. Assert that S_DAX is not set on an inode which is just being loaded. Signed-off-by: Ira Weiny --- fs/ext4/ext4.h | 2 +- fs/ext4/ialloc.c | 2 +- fs/ext4/inode.c | 8 +++++--- fs/ext4/ioctl.c | 3 ++- fs/ext4/super.c | 4 ++-- fs/ext4/verity.c | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index aadf33d5b37d..7f9234cce5b8 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2699,7 +2699,7 @@ extern int ext4_can_truncate(struct inode *inode); extern int ext4_truncate(struct inode *); extern int ext4_break_layouts(struct inode *); extern int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length); -extern void ext4_set_inode_flags(struct inode *); +extern void ext4_set_inode_flags(struct inode *, bool init); extern int ext4_alloc_da_blocks(struct inode *inode); extern void ext4_set_aops(struct inode *inode); extern int ext4_writepage_trans_blocks(struct inode *); diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index f95ee99091e4..1519a4bf42fa 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -1104,7 +1104,7 @@ struct inode *__ext4_new_inode(handle_t *handle, struct inode *dir, ei->i_block_group = group; ei->i_last_alloc_group = ~0; - ext4_set_inode_flags(inode); + ext4_set_inode_flags(inode, true); if (IS_DIRSYNC(inode)) ext4_handle_sync(handle); if (insert_inode_locked(inode) < 0) { diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e9d582e516bc..e9dfdfd6c698 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4408,11 +4408,13 @@ static bool ext4_enable_dax(struct inode *inode) return (flags & EXT4_DAX_FL) == EXT4_DAX_FL; } -void ext4_set_inode_flags(struct inode *inode) +void ext4_set_inode_flags(struct inode *inode, bool init) { unsigned int flags = EXT4_I(inode)->i_flags; unsigned int new_fl = 0; + J_ASSERT(!(IS_DAX(inode) && init)); + if (flags & EXT4_SYNC_FL) new_fl |= S_SYNC; if (flags & EXT4_APPEND_FL) @@ -4423,7 +4425,7 @@ void ext4_set_inode_flags(struct inode *inode) new_fl |= S_NOATIME; if (flags & EXT4_DIRSYNC_FL) new_fl |= S_DIRSYNC; - if (ext4_enable_dax(inode)) + if (init && ext4_enable_dax(inode)) new_fl |= S_DAX; if (flags & EXT4_ENCRYPT_FL) new_fl |= S_ENCRYPTED; @@ -4639,7 +4641,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, * not initialized on a new filesystem. */ } ei->i_flags = le32_to_cpu(raw_inode->i_flags); - ext4_set_inode_flags(inode); + ext4_set_inode_flags(inode, true); inode->i_blocks = ext4_inode_blocks(raw_inode, ei); ei->i_file_acl = le32_to_cpu(raw_inode->i_file_acl_lo); if (ext4_has_feature_64bit(sb)) diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index ca07d5086f03..efe41dcc8807 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -393,7 +393,8 @@ static int ext4_ioctl_setflags(struct inode *inode, ext4_clear_inode_flag(inode, i); } - ext4_set_inode_flags(inode); + ext4_set_inode_flags(inode, false); + inode->i_ctime = current_time(inode); err = ext4_mark_iloc_dirty(handle, inode, &iloc); diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0175fbfeb2ea..43cc52ea7918 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1349,7 +1349,7 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len, ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT); ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); - ext4_set_inode_flags(inode); + ext4_set_inode_flags(inode, false); } return res; } @@ -1372,7 +1372,7 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len, ctx, len, 0); if (!res) { ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT); - ext4_set_inode_flags(inode); + ext4_set_inode_flags(inode, false); res = ext4_mark_inode_dirty(handle, inode); if (res) EXT4_ERROR_INODE(inode, "Failed to mark inode dirty"); diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c index ce3f9a198d3b..4f7d780ff6da 100644 --- a/fs/ext4/verity.c +++ b/fs/ext4/verity.c @@ -244,7 +244,7 @@ static int ext4_end_enable_verity(struct file *filp, const void *desc, if (err) goto out_stop; ext4_set_inode_flag(inode, EXT4_INODE_VERITY); - ext4_set_inode_flags(inode); + ext4_set_inode_flags(inode, false); err = ext4_mark_iloc_dirty(handle, inode, &iloc); } out_stop: From patchwork Tue Apr 14 04:00:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1270103 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491Wxd6Fbgz9sSt for ; Tue, 14 Apr 2020 14:01:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404976AbgDNEBD (ORCPT ); Tue, 14 Apr 2020 00:01:03 -0400 Received: from mga05.intel.com ([192.55.52.43]:10170 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726378AbgDNEA4 (ORCPT ); Tue, 14 Apr 2020 00:00:56 -0400 IronPort-SDR: j9ZXsUHp/+ZSLVxp+F1S4XzdNCxtvNcan8jqtQaMFjpkTXD2nXbZwytOIiq1HhIyu88VssSYXA 0LdfSgm19aSA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:56 -0700 IronPort-SDR: 0hJsumdI/7fzzMAB9Zl7n0RHAY8Vpjn4lt3tjMyg0RKAMFnE4RvbWaBQSdWrwygOLJj++GBdAL fXze5GANiKVg== X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="332053898" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 21:00:55 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Jan Kara Cc: Ira Weiny , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH RFC 8/8] Documentation/dax: Update DAX enablement for ext4 Date: Mon, 13 Apr 2020 21:00:30 -0700 Message-Id: <20200414040030.1802884-9-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414040030.1802884-1-ira.weiny@intel.com> References: <20200414040030.1802884-1-ira.weiny@intel.com> MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny Update the document to reflect ext4 and xfs now behave the same. Signed-off-by: Ira Weiny --- Documentation/filesystems/dax.txt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt index af14c1b330a9..5f28b22d2815 100644 --- a/Documentation/filesystems/dax.txt +++ b/Documentation/filesystems/dax.txt @@ -22,18 +22,7 @@ on it as usual. The DAX code currently only supports files with a block size equal to your kernel's PAGE_SIZE, so you may need to specify a block size when creating the file system. -Currently 2 filesystems support DAX, ext4 and xfs. Enabling DAX on them is -different at this time. - -Enabling DAX on ext4 --------------------- - -When mounting the filesystem, use the "-o dax" option on the command line or -add 'dax' to the options in /etc/fstab. - - -Enabling DAX on xfs -------------------- +Currently 2 filesystems support DAX, ext4 and xfs. Summary -------