]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: check xattr 'system.data' before setting inline_data feature
authorLi Dongyang <dongyangli@ddn.com>
Tue, 13 Nov 2018 04:46:03 +0000 (15:46 +1100)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 15 Nov 2018 18:02:34 +0000 (13:02 -0500)
commit4a11f499573c71fde91623f45146fdc60a4bb89c
treea7dfc41f055d92c43381e21b3900feb1b96f8541
parent1dc6d6e33a3a5d8d822cc8aa9b1b64162ae83a0d
e2fsck: check xattr 'system.data' before setting inline_data feature

ext2fs_inline_data_size will happy return 0 and set size to
EXT4_MIN_INLINE_DATA_SIZE even when inode doesn't have
xattr 'system.data', a corrupted i_flags could make e2fsck
enable the inline_data on the superblock.

We should only offer to enable inline_data when i_flags is set
and xattr 'system.data' can be found.

Also use correct prompt for PR_1_INLINE_DATA_FEATURE.

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
e2fsck/pass1.c
e2fsck/problem.c
tests/f_inlinedata_flags/expect.1 [new file with mode: 0644]
tests/f_inlinedata_flags/expect.2 [new file with mode: 0644]
tests/f_inlinedata_flags/image.gz [new file with mode: 0644]
tests/f_inlinedata_flags/name [new file with mode: 0644]