public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* fsck doesn't seem to understand inline directories
@ 2019-06-12 14:07 Rasmus Villemoes
  2019-06-12 20:40 ` Andreas Dilger
  0 siblings, 1 reply; 4+ messages in thread
From: Rasmus Villemoes @ 2019-06-12 14:07 UTC (permalink / raw)
  To: linux-ext4

Hi

Doing a forced check on an ext4 file system with inline_data results in
lots of warnings - and I think answering yes to "fixing" those would
actually corrupt the fs. To reproduce:

truncate -s 100000000 ext4.img
misc/mke2fs -t ext4 -b 4096 -I 512 -O
'^dir_nlink,extra_isize,filetype,^huge_file,inline_data,large_file,large_dir,^meta_bg,^project,^quota,^resize_inode,sparse_super,64bit,metadata_csum_seed,metadata_csum'
-U random -v ext4.img
mkdir m
sudo mount ext4.img m
sudo chown $USER:$USER m
mkdir m/aa
echo 123 > m/aa/123
touch m/aa/empty
seq 10000 > m/aa/largefile
mkdir m/aa/bb
mkdir m/cc
sudo umount m
e2fsck/e2fsck -f -n ext4.img

The last command gives this output:

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

Unconnected directory inode 16 (/aa/bb)
Connect to /lost+found? no

'..' in /cc (17) is <The NULL inode> (0), should be / (2).
Fix? no

Pass 4: Checking reference counts
Inode 2 ref count is 5, should be 3.  Fix? no

Inode 12 ref count is 3, should be 1.  Fix? no

Unattached inode 13
Connect to /lost+found? no

Unattached zero-length inode 14.  Clear? no

Unattached inode 14
Connect to /lost+found? no

Unattached inode 15
Connect to /lost+found? no

Unattached inode 16
Connect to /lost+found? no

Inode 17 ref count is 2, should be 1.  Fix? no

Pass 5: Checking group summary information

ext4.img: ********** WARNING: Filesystem still has errors **********

ext4.img: 17/24416 files (5.9% non-contiguous), 4096/24414 blocks
-----

Am I doing something wrong? The kernel mounting the fs above is 4.15, in
case that matters.

Rasmus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-13 16:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-12 14:07 fsck doesn't seem to understand inline directories Rasmus Villemoes
2019-06-12 20:40 ` Andreas Dilger
2019-06-13  1:50   ` Theodore Ts'o
2019-06-13  2:22     ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox