Skip to content

native implementation of ext4 directory hashing - #456

Merged
deitch merged 1 commit into
masterfrom
rewrite-ext4-dirhashing
Nov 4, 2026
Merged

deitch merged 1 commit into
masterfrom
rewrite-ext4-dirhashing

Conversation

@deitch

@deitch deitch commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Fixes #455

#455 found that the ext4 directory hashing code hewed a little too closely to the kernel original, which is open source but is licensed GPL-2. The boundary between "read the source and inspired to recreate" and "this might be a copy" was too close. At Ted T'so's suggestion, I took an AI agent, asked it to read the source and generate a spec describing the algorithm. This was placed in the markdown file included in this PR. I then removed the relevant files - md4/md4.go, md4/md4_test.go, dirhash.go, dirhash_test.go - and asked a separate agent to implement the spec here without referencing any source code other than what is in this directory. The result is in this PR after my review.

Signed-off-by: Avi Deitcher <avi@deitcher.net>
@deitch
deitch force-pushed the rewrite-ext4-dirhashing branch from a01705c to f7df318 Compare November 4, 2026 09:33
@deitch
deitch merged commit 3c8a3e3 into master Nov 4, 2026
20 checks passed
@deitch
deitch deleted the rewrite-ext4-dirhashing branch November 4, 2026 10:07
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.

ext4 dirhash and md4 look ported from the kernel's GPL-2 fs/ext4/hash.c, but LICENSE says MIT

1 participant