Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1045052pxa; Fri, 28 Aug 2020 01:59:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ2KymxgI/Kvp9KwDVQ7jBJJ+DRAN0moXihHyX2aZmswy7rT+VzDJViZMOMzefFcsd5etP X-Received: by 2002:a17:906:1b:: with SMTP id 27mr715411eja.517.1598605196839; Fri, 28 Aug 2020 01:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598605196; cv=none; d=google.com; s=arc-20160816; b=IJqjvGlK6gVMzPB1syBDPuCVWRF5mNymZ46oU88EZdIZNo5h+3Vry58hKUkG0LAEtm q2Zi9Z8zFyFhYiKEKWAQ4pdMch2KVZGbebyF+R2e/rtb9CdG5aDLOZE0bS7sFJI0QjKK GfyzxZRLpvuV3mLhHJHjyiV0pMtHs3g/0wlGiLFq/o1/v1dwUHH2N2G4feeqEbRpk6Y/ ZoxZlfr5BUn4lg+IFOXAmnt0V9C++m/fCcJkbE3HE/FxZcy3gR8ZCMSfhbs+dTPKsJoW DrvOzMq6YdVbOcXf8Xt6iwK5+rUoA94x6tavpXvkRGt/ibrbSbQXM37RFlryXEjBPqoB n8OQ== 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:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=jB11MAnJiIkTBda883zCBYstyw29fMcsJcYyy7QRpns=; b=ISytf9qGJnlPrGHbZ0GaOUx/OEWtkXgMw/Ji9QeNRQR8Y6tIHLbtgI1eeYRpBx3ghM d7mQ6dElDH0FDNAdquP3AKIeW4r7/+87Is5Kv+IOZayGyIJ/F7eZ00aWLMoJF18AO2O2 F9Ng7reeJXQhz0tWhSMo5B8WNre5mQsN4GJUywDKUsAwf2NzLS6Ws2J3qGjb92s5SHRZ Wreet30g9B2DZnR5+l1mkcs7OwJo58fFiwmVXGuUMaM3czQ7HtYzCxgp8iWynLWAT13m ebUDyMwEKlnq0d5i76N791rPeBa5b2I3DIpni6zlYpLUkmOGJyjgwzr10vPpjCcqLB61 83ew== 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 rl25si223878ejb.716.2020.08.28.01.59.32; Fri, 28 Aug 2020 01:59:56 -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 S1728779AbgH1I7M (ORCPT + 99 others); Fri, 28 Aug 2020 04:59:12 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:50749 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728555AbgH1I7M (ORCPT ); Fri, 28 Aug 2020 04:59:12 -0400 X-IronPort-AV: E=Sophos;i="5.76,363,1592841600"; d="scan'208";a="98664050" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 28 Aug 2020 16:59:08 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id BC70D48990C5; Fri, 28 Aug 2020 16:59:04 +0800 (CST) Received: from [10.167.220.69] (10.167.220.69) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 28 Aug 2020 16:59:05 +0800 Message-ID: <5F48C756.9080406@cn.fujitsu.com> Date: Fri, 28 Aug 2020 16:59:02 +0800 From: Xiao Yang User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.2; zh-CN; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Jan Kara CC: , , , Subject: Re: [PATCH] ext4: Disallow modifying DAX inode flag if inline_data has been set References: <20200828071501.8402-1-yangx.jy@cn.fujitsu.com> <20200828084921.GB7072@quack2.suse.cz> In-Reply-To: <20200828084921.GB7072@quack2.suse.cz> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.220.69] X-ClientProxiedBy: G08CNEXCHPEKD06.g08.fujitsu.local (10.167.33.205) To G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) X-yoursite-MailScanner-ID: BC70D48990C5.A97BA X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com X-Spam-Status: No Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 2020/8/28 16:49, 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. Hi Jan, Thanks for your quick reply. :-) I will send v2 patch shortly as you suggested. Best Regards, Xiao Yang > Thanks! > > 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 >> >> >>