Skip to content

fix(mkfs): reserve correct htree checksum tail - #20

Merged
adam-rl merged 1 commit into
mainfrom
adam/fix-ext4-htree-limit
Aug 25, 2026
Merged

fix(mkfs): reserve correct htree checksum tail#20
adam-rl merged 1 commit into
mainfrom
adam/fix-ext4-htree-limit

Conversation

@adam-rl

@adam-rl adam-rl commented Aug 24, 2026

Copy link
Copy Markdown

What this PR does / why we need it:

Fixes corrupt ext4 directory indexes created when metadata_csum is enabled. The pinned e2fsprogs fork reserved a 12-byte directory-entry checksum tail in an HTREE root, but HTREE roots use an 8-byte ext2_dx_tail. On 4 KiB filesystems this wrote limit 506 where the kernel and e2fsck require 507.

Adds an E2E regression that converts a directory with 1,000 entries and requires e2fsck -fn to pass.

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update? No.
  • Does this introduce breaking changes that would require an announcement or bumping the major version? No.
  • Do all new files have an appropriate license header? The new file is a patch to the existing LGPL source.

@adam-rl
adam-rl force-pushed the adam/fix-ext4-htree-limit branch from 4460bd3 to f7a8304 Compare August 24, 2026 23:38
@adam-rl
adam-rl force-pushed the adam/fix-ext4-htree-limit branch from f7a8304 to d041e1e Compare August 25, 2026 01:15
@adam-rl
adam-rl merged commit 54eac3a into main Aug 25, 2026
6 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant