From: sashiko-bot@kernel.org
To: hengyul@cs.unc.edu
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: do not accept rec_len 0 for block sizes below 64k
Date: Tue, 06 Oct 2026 11:23:05 +0000 [thread overview]
Message-ID: <20261006112306.4AAEA1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261006111546.3252481-1-hengyul@cs.unc.edu>
> From: Hengyu Liang <hengyul@cs.unc.edu>
>
> 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.
>
> The issue can be reproduced on a file system without metadata_csum:
>
> [ ... ]
> unchanged when the block size is below 64k, as e2fsprogs does.
>
> Fixes: afa6d5a16bf2 ("ext4: remove PAGE_SIZE checks for rec_len conversion")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hengyu Liang <hengyul@cs.unc.edu>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006111546.3252481-1-hengyul@cs.unc.edu?part=1
next prev parent reply other threads:[~2026-10-06 11:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 11:15 [PATCH] ext4: do not accept rec_len 0 for block sizes below 64k hengyul
2026-10-06 11:23 ` sashiko-bot [this message]
2026-10-06 16:16 ` Jan Kara
2026-10-07 7:43 ` Andreas Dilger
2026-10-08 2:38 ` Baokun Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261006112306.4AAEA1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=hengyul@cs.unc.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.