Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4436477ybb; Tue, 14 Apr 2020 07:18:26 -0700 (PDT) X-Google-Smtp-Source: APiQypJSDE9uhWIshmw4KwmGJ37stzQXd4kP9nr8T40KnWDEI8EuuPvnXCqzno7Ztkc0ISoyZwEu X-Received: by 2002:a17:906:6050:: with SMTP id p16mr307476ejj.179.1586873906147; Tue, 14 Apr 2020 07:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586873906; cv=none; d=google.com; s=arc-20160816; b=w3EfvAnLgmsd4kKLM1WGKkJO6LrpqZcvYzWebHdKpULX29lCN/r5PWW17petKT2KeG MIRGTfgBFTqLokpdDkllMofhBWnXa9sjMr/FhWc/SW+H64GEs4FTvymnflMPE2j0i+M7 CKyZODxiaxg93FQVJFpF6oBXGthf3lp9DSP77O2LhCoQ2SBxev+eCwRu88TOKbT89biN FPWbTW8+DksrM4OCvaWTPZ0GflxTUffmkXTiVdaZx6Oz6NOj6Ziexy+9Jw4QhrwIMTqd m4iD7B8utRA5lrlghYkwJC+Nnn5Bzi1MOT9FrXBZRPHVcRQtEz3I0tX2FPgTGmgz17Kf zwhw== 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=nZCpvSLD/cuflVjEx38OCKDphxHxFjwadtgAj+CwDWs=; b=wtSjjpZZaoDVF0Ztmxgjuomn/Gd5rJDxikGfNYZ7gJ7BrEbwAtLjANSr4tWci/+Gdw LykqxqC/9aa6So1G/ujXHEIPbeIUMFpQHIt8wJcHsjNVgjZGNnU9dfsdpOBKW3FeF660 71/yEvk+OQWW3LmAiCVKMwEf6ha3+IN7shyhbyiL8QkhQHPXQWj9+aGRKBN+EwyUUzAl iOF8Xo4rLOeFHVujBiZkFmg0OKoYL9JCo/ByurV6vlkr0hqRQhVDZFHRNJxxpR+nu2ed 94/C+UjhfgEuuG7mgbogf6ESrPcACTbUVkN1A18m0bNkeeqClSbY1gsgSc+eRpKeralz s0pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for 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 u26si8325541eje.459.2020.04.14.07.18.01; Tue, 14 Apr 2020 07:18:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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: best guess record for 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 S1726055AbgDNEAq (ORCPT + 99 others); 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 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. 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 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; } -- 2.25.1