From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35AEAC2BA19 for ; Wed, 15 Apr 2020 12:27:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F9D52137B for ; Wed, 15 Apr 2020 12:27:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S369284AbgDOM1d (ORCPT ); Wed, 15 Apr 2020 08:27:33 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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