diff options
author | Artem Blagodarenko <artem.blagodarenko@gmail.com> | 2019-06-14 17:42:37 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-06-19 23:14:39 -0400 |
commit | 10c5c5e564206197384e794caca3baca6a970c63 (patch) | |
tree | e822123f7933201638c669331813e65cbea6f855 /scrub | |
parent | c2eedf431e13c8bbdfc5bb81e8fec912fdf643cb (diff) | |
download | e2fsprogs-10c5c5e564206197384e794caca3baca6a970c63.tar.gz |
e2fsck: correctly handle inline directories when large_dir is enabled.
Historically, e2fsck has required that directories not contain holes.
(In fact, as of this writing, ext4 still requires this to be the
case.) Commit ae9efd05a98 ("e2fsck: 3 level hash tree directory
optimization") removed this requirement if the large_dir feature is
enabled; however, the way it was done caused it to incorrectly handle
inline directories.
To reproduce the problem fixed by this commit:
truncate -s 100000000 ext4.img
misc/mke2fs -t ext4 -I 512 -O 'inline_data,large_dir' ext4.img
mkdir m
sudo mount ext4.img m
mkdir m/aa
sudo umount m
e2fsck/e2fsck -f -n ext4.img
The last command gives this output:
[root@localhost e2fsprogs-kernel]# e2fsck/e2fsck -f -n ext4-2.img
e2fsck 1.45.2 (27-May-2019)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
'..' in /aa (12) is <The NULL inode> (0), should be / (2).
Fix? no
Pass 4: Checking reference counts
Inode 2 ref count is 4, should be 3. Fix? no
Inode 12 ref count is 2, should be 1. Fix? no
Pass 5: Checking group summary information
ext4-2.img: ********** WARNING: Filesystem still has errors **********
ext4-2.img: 12/24384 files (0.0% non-contiguous), 17874/97656 blocks
Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Artem Blagodarenko <c17828@cray.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'scrub')
0 files changed, 0 insertions, 0 deletions