ext4: prevent initializing reserved inodes
authorchenlong <chenlongcl.chen@huawei.com>
Fri, 28 May 2021 03:13:07 +0000 (11:13 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 30 May 2021 13:35:24 +0000 (21:35 +0800)
commit37881397f1aa62df3c63468049c80b301b0e89eb
treea626f35d9b629eff520343012e9aab480e1f4dac
parent986733634c61581915deed82692fb92bee587115
ext4: prevent initializing reserved inodes

Check the block group zero and prevent initializing reserved inodes.
But in some special cases, the reserved inode may not all belong to
the group zero, it may exist into the second group if we formatĀ 
filesystem below.

  mkfs.ext4 -b 4096 -g 8192 -N 1024 -I 4096 /dev/sda

So, it will end up triggering a false positive report of a corrupted
file system

It's a regression test for kernel commit a149d2a5cabb ("ext4: fix
check to prevent false positive report of incorrect used inodes")

Signed-off-by: Chen Long <chenlongcl.chen@huawei.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/ext4/049 [new file with mode: 0755]
tests/ext4/049.out [new file with mode: 0644]
tests/ext4/group