Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp664956ybz; Wed, 15 Apr 2020 16:13:20 -0700 (PDT) X-Google-Smtp-Source: APiQypLy/pJT6Tk6pYa7LbrwXtyqLIgG8AHlJ6acOt7iarEIEeUtEqxpKbvyB7MIVCY6PMchgghR X-Received: by 2002:a05:6402:1657:: with SMTP id s23mr25361754edx.74.1586992400104; Wed, 15 Apr 2020 16:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586992400; cv=none; d=google.com; s=arc-20160816; b=mVUBXPSWMjlj/7L9RlEtH7hJjWF+rQ+T85u3bo+UfKdhLpZjZwDetWu1qhrcQRU5gw e3SbzdBrlcA1VOe5+kM3ncxphX9fBLuev2vqfj8wPGER2BWdeCZxMZfIyKTxpq6fqnaY OTC7sYhz8jliJW6IZW/61B5Z7U+p0IIhpsYEg/5J11ol8nqLV1gZzyf8s64GbK42orB9 NAL5yP72BdwGkeEKb3+HnHWafuMmlYxEWVwaUnjfg0wkK0EJ/7zJUsqYIjGLlVylWzrk m3h7Blgerzrp+0OYNrU2NkSDam3R7ln2clc6TfC0vMISQ6vLjZB4ieX05IsyQa4tEfdr zllA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=rSc6iB26OryOEpjLFu9zb0V71zPcfrVGbZFRyUQAPL4=; b=MYWEKp/QBm72ldsXR01wSkmIoE7+O2SPWQgRROGIcVX6MXFreb9ulfgUNdp3546eXT D8iuw1ng0NrpYT4fl560bNz6gjHi055AJzGq9g7iShL/cxg/iHfCcgu+FKSoBr8VGovd 0TcqocqCKF0+pSrFpzg+80GM7UdYlc4P22OsJ+s7HjIbZvRk35MEuWeI7PLJ7F4d3uPN zWM7C/E6lRQzUh4h4Ot3+PuPBdLrt/ceQ9KU5FeYUswGWUVRwDIp2uKXOIvl8IGzZ+KQ 4xPJ2I/bo2m2nMeOKxzSAK4PzwD5kZdd5BjWmOV0BKYhspyjYNvCQJXzOtm1yRZgyfYf HouA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si8404070edv.341.2020.04.15.16.12.56; Wed, 15 Apr 2020 16:13:20 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409889AbgDOM1V (ORCPT + 99 others); Wed, 15 Apr 2020 08:27:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:56536 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409161AbgDOLpW (ORCPT ); Wed, 15 Apr 2020 07:45:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 79949ACD8; Wed, 15 Apr 2020 11:45:19 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 5DB121E1250; Wed, 15 Apr 2020 13:45:18 +0200 (CEST) Date: Wed, 15 Apr 2020 13:45:18 +0200 From: Jan Kara To: ira.weiny@intel.com Cc: linux-kernel@vger.kernel.org, Jan Kara , "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: Re: [PATCH RFC 1/8] fs/ext4: Narrow scope of DAX check in setflags Message-ID: <20200415114518.GC6126@quack2.suse.cz> References: <20200414040030.1802884-1-ira.weiny@intel.com> <20200414040030.1802884-2-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414040030.1802884-2-ira.weiny@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon 13-04-20 21:00:23, ira.weiny@intel.com wrote: > 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 Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > 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 > -- Jan Kara SUSE Labs, CR