Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1343861pxa; Fri, 28 Aug 2020 10:03:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqa6b6nCWRzJLe/oj88YSmBGphdLNPdibFsju69dKdKZYwaowxcUGDU7q/+dNo8KiVPdRv X-Received: by 2002:a17:906:2818:: with SMTP id r24mr221724ejc.31.1598634201174; Fri, 28 Aug 2020 10:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598634201; cv=none; d=google.com; s=arc-20160816; b=CyrMZsoWkPzpuDv+sGUni7ZJZFysCy77enTRW8pNN0f7ptXb6CpXHgWDiAd8tkb3oB YY9cqT9tXWkgq9MwLwJV2JUYuJTFzcdsFOjrJAVu3rL38GG/rsj6747n1lVqhJ1pbJyS cLzxxqYWIW+SfGrGofIC/QmfDl3GS36Bhjx1ZhmPBydxWzVFr7ThfinQi92Cg/8ZLvtw J8nHTvaDIqTQREs0c+m31eyWia/PwDXJr/G2miXg+7yXHdK9XIygf5PDS6yniACdsQd4 k+WkitoxX6+GuolziHFAyTFKq87Et5z9kYrw1tOk9N9K5I74s1yIdXq5yBRaVh0QFsJg lluQ== 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:ironport-sdr:ironport-sdr; bh=so8Cq7omdwaTSFcuborS+nJsA0D1zihWpiO4DLx+XZQ=; b=nsonA4z2BCXZQY1lIPhIiio8kWEpg7UOWMgGlR4kiq2JO3WNjm4h9sOAKTvMSYYzir JiMyuRCIr0xW20bRrCKeluQ/3FJplGN/12zkaSk7bNyfpOLJDKP+/xhHVxLgpMIfgJUB jvW0r+O2Yx+ak95px8hTYb7ZA2RYcMPKmgrufWlxgiTE2h1pUnTLuN4dRD0r3Llh+EdS s0uxayrsEuP2TVs0ah2/S//ZrTnH4Ke4tBwuHvIx0gyVTvEE40mAeTYYkXwTeJVWkkq7 8YSKvJfOT160vX3IqiiknQtGwXBF8xgrsZUIw4gPhi4O2ZJyG7k5wSS9hbM+xc8XqdS4 4k6Q== 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 t22si38315ejy.433.2020.08.28.10.02.56; Fri, 28 Aug 2020 10:03:21 -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 S1726395AbgH1RCx (ORCPT + 99 others); Fri, 28 Aug 2020 13:02:53 -0400 Received: from mga14.intel.com ([192.55.52.115]:16955 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgH1RCw (ORCPT ); Fri, 28 Aug 2020 13:02:52 -0400 IronPort-SDR: Pwf80R1M2++3ZubCnd9Cnhx0K4mycOR0GpAssY0rIcrGPUdA5aocNrI9UasVKfFEtw/wUBgk9u peS6GKlaT+sw== X-IronPort-AV: E=McAfee;i="6000,8403,9727"; a="155964390" X-IronPort-AV: E=Sophos;i="5.76,364,1592895600"; d="scan'208";a="155964390" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2020 10:02:52 -0700 IronPort-SDR: uwEaPveV3/q6hAMdL9Iod5Yo3ilUWbG78Ax7U7wiAgjY1XsNKsgy8LTieWRcp6humuxvJmrn6f SdBBr+eIs+fA== X-IronPort-AV: E=Sophos;i="5.76,364,1592895600"; d="scan'208";a="300298719" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2020 10:02:51 -0700 Date: Fri, 28 Aug 2020 10:02:51 -0700 From: Ira Weiny To: Jan Kara Cc: Xiao Yang , linux-ext4@vger.kernel.org, darrick.wong@oracle.com, tytso@mit.edu Subject: Re: [PATCH] ext4: Disallow modifying DAX inode flag if inline_data has been set Message-ID: <20200828170251.GB1422350@iweiny-DESK2.sc.intel.com> References: <20200828071501.8402-1-yangx.jy@cn.fujitsu.com> <20200828084921.GB7072@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200828084921.GB7072@quack2.suse.cz> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Aug 28, 2020 at 10:49:21AM +0200, Jan Kara wrote: > On Fri 28-08-20 15:15:01, Xiao Yang wrote: > > inline_data is mutually exclusive to DAX so enabling both of them triggers > > the following issue: > > ------------------------------------------ > > # mkfs.ext4 -F -O inline_data /dev/pmem1 > > ... > > # mount /dev/pmem1 /mnt > > # echo 'test' >/mnt/file > > # lsattr -l /mnt/file > > /mnt/file Inline_Data > > # xfs_io -c "chattr +x" /mnt/file > > # xfs_io -c "lsattr -v" /mnt/file > > [dax] /mnt/file > > # umount /mnt > > # mount /dev/pmem1 /mnt > > # cat /mnt/file > > cat: /mnt/file: Numerical result out of range > > ------------------------------------------ > > > > Signed-off-by: Xiao Yang > > Thanks. The patch looks good to me. You can add: > > Reviewed-by: Jan Kara > > Please also add the following tag to the changelog: > > Fixes: b383a73f2b83 ("fs/ext4: Introduce DAX inode flag") > > so that the patch gets properly picked up to stable trees etc. Thanks! And +1 on getting this to stable. Thanks! Ira > > Honza > > > --- > > fs/ext4/ext4.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h > > index 523e00d7b392..69187b6205b2 100644 > > --- a/fs/ext4/ext4.h > > +++ b/fs/ext4/ext4.h > > @@ -492,7 +492,7 @@ struct flex_groups { > > > > /* Flags which are mutually exclusive to DAX */ > > #define EXT4_DAX_MUT_EXCL (EXT4_VERITY_FL | EXT4_ENCRYPT_FL |\ > > - EXT4_JOURNAL_DATA_FL) > > + EXT4_JOURNAL_DATA_FL | EXT4_INLINE_DATA_FL) > > > > /* Mask out flags that are inappropriate for the given type of inode. */ > > static inline __u32 ext4_mask_flags(umode_t mode, __u32 flags) > > -- > > 2.25.1 > > > > > > > -- > Jan Kara > SUSE Labs, CR