* [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set
@ 2020-08-28 8:43 Xiao Yang
2020-08-28 17:57 ` Ira Weiny
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Xiao Yang @ 2020-08-28 8:43 UTC (permalink / raw)
To: linux-ext4; +Cc: darrick.wong, ira.weiny, tytso, jack, Xiao Yang
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
------------------------------------------
Fixes: b383a73f2b83 ("fs/ext4: Introduce DAX inode flag")
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Jan Kara <jack@suse.cz>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set
2020-08-28 8:43 [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set Xiao Yang
@ 2020-08-28 17:57 ` Ira Weiny
2020-08-29 7:27 ` Andreas Dilger
2020-10-03 4:13 ` Theodore Y. Ts'o
2 siblings, 0 replies; 5+ messages in thread
From: Ira Weiny @ 2020-08-28 17:57 UTC (permalink / raw)
To: Xiao Yang; +Cc: linux-ext4, darrick.wong, tytso, jack
On Fri, Aug 28, 2020 at 04:43:30PM +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
> ------------------------------------------
>
> Fixes: b383a73f2b83 ("fs/ext4: Introduce DAX inode flag")
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
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
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set
2020-08-28 8:43 [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set Xiao Yang
2020-08-28 17:57 ` Ira Weiny
@ 2020-08-29 7:27 ` Andreas Dilger
2020-09-17 3:29 ` Xiao Yang
2020-10-03 4:13 ` Theodore Y. Ts'o
2 siblings, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2020-08-29 7:27 UTC (permalink / raw)
To: Xiao Yang; +Cc: linux-ext4, darrick.wong, ira.weiny, tytso, jack
[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]
On Aug 28, 2020, at 2:43 AM, Xiao Yang <yangx.jy@cn.fujitsu.com> 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
> ------------------------------------------
>
> Fixes: b383a73f2b83 ("fs/ext4: Introduce DAX inode flag")
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
> ---
> 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
>
>
>
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set
2020-08-29 7:27 ` Andreas Dilger
@ 2020-09-17 3:29 ` Xiao Yang
0 siblings, 0 replies; 5+ messages in thread
From: Xiao Yang @ 2020-09-17 3:29 UTC (permalink / raw)
To: tytso; +Cc: Andreas Dilger, linux-ext4, darrick.wong, ira.weiny, jack
Hi,
Ping :-)
Best Regards,
Xiao Yang
On 2020/8/29 15:27, Andreas Dilger wrote:
> On Aug 28, 2020, at 2:43 AM, Xiao Yang<yangx.jy@cn.fujitsu.com> 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
>> ------------------------------------------
>>
>> Fixes: b383a73f2b83 ("fs/ext4: Introduce DAX inode flag")
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>> Reviewed-by: Jan Kara<jack@suse.cz>
> Reviewed-by: Andreas Dilger<adilger@dilger.ca>
>
>> ---
>> 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
>>
>>
>>
>
> Cheers, Andreas
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set
2020-08-28 8:43 [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set Xiao Yang
2020-08-28 17:57 ` Ira Weiny
2020-08-29 7:27 ` Andreas Dilger
@ 2020-10-03 4:13 ` Theodore Y. Ts'o
2 siblings, 0 replies; 5+ messages in thread
From: Theodore Y. Ts'o @ 2020-10-03 4:13 UTC (permalink / raw)
To: Xiao Yang; +Cc: linux-ext4, darrick.wong, ira.weiny, jack
On Fri, Aug 28, 2020 at 04:43:30PM +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
> ------------------------------------------
>
> Fixes: b383a73f2b83 ("fs/ext4: Introduce DAX inode flag")
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-03 4:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 8:43 [PATCH v2] ext4: Disallow modifying DAX inode flag if inline_data has been set Xiao Yang
2020-08-28 17:57 ` Ira Weiny
2020-08-29 7:27 ` Andreas Dilger
2020-09-17 3:29 ` Xiao Yang
2020-10-03 4:13 ` Theodore Y. Ts'o
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.