Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1667313ybk; Thu, 21 May 2020 12:15:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKpz4sUofim3BnO68z34PpQBzBIJA9pPGat/0nmZ+ghSi1e41EDih+Id4nzsf/jORnnZpY X-Received: by 2002:a17:907:9d5:: with SMTP id bx21mr4812471ejc.510.1590088518123; Thu, 21 May 2020 12:15:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590088518; cv=none; d=google.com; s=arc-20160816; b=LSBKBAPk91vMCuxne+mJWbqjg+RWyIBntkzp2B7CabmQK50fwFmfOcQALq7Uv0V8Yu ZBtKCI4pmCEiHfQH0EgeEbgLtc1TMuvqZ0sfOu6gvvHj9wPg5ZDNgjSYTt60ZVFqsHJf nVAys2bfHd1U7MirTqTcBU303EzVF41FUWLfSHOPW2U/mj2HOkoL1uMOw8Y8czlfHKKJ 8Msd5ilgGMPNcp9HMbo5WhiEYvw4W2fa41Qi3ZCRUVV1EWdLCTTWeSFbuy74Fqu1l4dm ApdDOGYJdHJJz6brEqrNpZiMtudTHJbXGcgeKvgc8eonMaOjLpMe47NKWztDlc8IK8ha /y5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=A8W8mJLUl4JO2+IAZojgF8VVvvkSIee7FD8LVpbcQVc=; b=xzFLXg04uKmGM0WJJ99xpHh+/yS4axRAZTFfKkpyDDjXfaJj0bx7jBpZ+1E117NLyZ mmVrgnAepamwFkYGcOVlWbl1exOBDTKo9WHuL9F/Qj4qzAlXGtAEt2YHcZW2a+ZS0RfM eKVXesmsZPqkHetz9QHy8AGCV2Rqc7FGwoA8NdOLzs8GTnTW08YOp7wIGeRyDi3Sr7/R Q1/WpCJbu6k/mj7AfEGjF7d3hsXBfHo5M05wi5PfCjAvRjS53g4TAA1q2cG0ioC0t+1j QjQTexPktR5VdzLMdbamovJg3B4bqfxnhd0ei7nwBAWy/g83KWXqnr6zHPedYI46luUW Ed8A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si3999998edc.130.2020.05.21.12.14.55; Thu, 21 May 2020 12:15:18 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730313AbgEUTNT (ORCPT + 99 others); Thu, 21 May 2020 15:13:19 -0400 Received: from mga05.intel.com ([192.55.52.43]:24227 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729600AbgEUTNS (ORCPT ); Thu, 21 May 2020 15:13:18 -0400 IronPort-SDR: GgWb7EKBN1nGREGGP0E0D3EtyeV9Wh+Uhi7Jr3yKRNCkpsOJY6o9MoHB23XifJ/tcmVthj8oB2 wXiIKK6en60g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2020 12:13:17 -0700 IronPort-SDR: DGByqBAOvVYaTWjhITMljJQC89/XXiifYg1qrkINopV3Yy6vC+PtM5AIMGe9HBg4x9gbcy7i0Z vleL0Co3lDKA== X-IronPort-AV: E=Sophos;i="5.73,418,1583222400"; d="scan'208";a="466911668" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2020 12:13:17 -0700 From: ira.weiny@intel.com To: linux-ext4@vger.kernel.org, Andreas Dilger , "Theodore Y. Ts'o" , Jan Kara , Eric Biggers Cc: Ira Weiny , Al Viro , Dan Williams , Dave Chinner , Christoph Hellwig , Jeff Moyer , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 1/8] fs/ext4: Narrow scope of DAX check in setflags Date: Thu, 21 May 2020 12:13:06 -0700 Message-Id: <20200521191313.261929-2-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200521191313.261929-1-ira.weiny@intel.com> References: <20200521191313.261929-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Jan Kara Signed-off-by: Ira Weiny --- 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 bfc1281fc4cb..5813e5e73eab 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -393,9 +393,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; } -- 2.25.1