public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: linux-ext4@vger.kernel.org, darrick.wong@oracle.com,
	tytso@mit.edu, jack@suse.cz
Subject: Re: [PATCH] ext4: Disallow modifying DAX inode flag if inline_data has been set
Date: Fri, 28 Aug 2020 10:01:52 -0700	[thread overview]
Message-ID: <20200828170151.GA1422350@iweiny-DESK2.sc.intel.com> (raw)
In-Reply-To: <20200828071501.8402-1-yangx.jy@cn.fujitsu.com>

On Fri, Aug 28, 2020 at 03:15:01PM +0800, 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 <yangx.jy@cn.fujitsu.com>

Thank you for the fix!

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
>  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
> 
> 
> 

      parent reply	other threads:[~2020-08-28 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28  7:15 [PATCH] ext4: Disallow modifying DAX inode flag if inline_data has been set Xiao Yang
2020-08-28  8:49 ` Jan Kara
2020-08-28  8:59   ` Xiao Yang
2020-08-28 17:02   ` Ira Weiny
2020-08-28 17:01 ` Ira Weiny [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200828170151.GA1422350@iweiny-DESK2.sc.intel.com \
    --to=ira.weiny@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=yangx.jy@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox