Re: [PATCH] ext4: do not accept rec_len 0 for block sizes below 64k
From: Theodore Ts'o
Date: Thu Nov 19 2026 - 09:51:17 EST
On Tue, 06 Oct 2026 07:15:46 -0400, hengyul@xxxxxxxxxx wrote:
> Commit afa6d5a16bf2 ("ext4: remove PAGE_SIZE checks for rec_len
> conversion") made ext4_rec_len_from_disk() read a rec_len of 0 as "this
> entry covers the whole block" for every block size.
>
> However, this special value only exists for block sizes of 64k and
> more. With smaller blocks, a rec_len of 0 means that the directory
> block is corrupted. As of now, a directory block that has been
> overwritten with zeroes is treated as an empty block. The kernel no
> longer reports the corruption and can store new entries in that block,
> while e2fsck still reports the block as corrupted.
>
> [...]
Applied, thanks!
[1/1] ext4: do not accept rec_len 0 for block sizes below 64k
commit: a816507bd36b7199e6ca5fbed81e06ceb67477e8
Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>