Skip to content

Fix the hardlink count decrement threshold and unlink cleanup - #610

Merged
crosbymichael merged 6 commits into
apple:mainfrom
dkovba:hardlink-count
Apr 9, 2026
Merged

Fix the hardlink count decrement threshold and unlink cleanup#610
crosbymichael merged 6 commits into
apple:mainfrom
dkovba:hardlink-count

Conversation

@dkovba

@dkovbadkovba commented Mar 30, 2026

Copy link
Copy Markdown
Contributor
  • Fixes a hardlink count decrement threshold
  • Fixes unlinking not freeing the first inode

Resolves the failing added tests:

✘ Test hardlinkLinksCount() recorded an issue at TestEXT4Format+Link.swift:43:9: Expectation failed: try EXT4.EXT4Reader(blockDevice: afterUnlink).stat("/original").inode.linksCount == 1
✘ Test hardlinkLinksCount() failed after 0.016 seconds with 1 issue.
✘ Test unlinkFirstInodeFreesInode() recorded an issue at TestEXT4Format+Link.swift:58:9: Expectation failed: try EXT4.EXT4Reader(blockDevice: path).superBlock.freeInodesCount == EXT4.EXT4Reader(blockDevice: emptyPath).superBlock.freeInodesCount
✘ Test unlinkFirstInodeFreesInode() failed after 0.014 seconds with 1 issue.

@dkovba
dkovba requested a review from wlan0March 30, 2026 21:37
Comment threadSources/ContainerizationEXT4/EXT4+Formatter.swift
@dkovba
dkovba marked this pull request as draft March 30, 2026 22:19
@dkovba
dkovba marked this pull request as ready for review March 30, 2026 22:27
@dkovba

Copy link
Copy Markdown
ContributorAuthor

@wlan0 Thank you for reviewing. Added another bug fix into this PR.

@dkovbadkovba changed the title Fix a hardlink count decrement thresholdFix a hardlink count decrement threshold and the unlink cleanupMar 30, 2026
@dkovbadkovba changed the title Fix a hardlink count decrement threshold and the unlink cleanupFix the hardlink count decrement threshold and unlink cleanupMar 30, 2026
@dkovba
dkovba requested a review from wlan0March 31, 2026 01:12
@crosbymichael

Copy link
Copy Markdown
Contributor

Sorry, this needs rebased again.

# Conflicts:
#	Tests/ContainerizationEXT4Tests/TestEXT4Format.swift
@crosbymichael
crosbymichael merged commit 250546f into apple:mainApr 9, 2026
4 checks passed
@dkovba
dkovba deleted the hardlink-count branch April 9, 2026 19:30
Sign up for freeto 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.

4 participants

@dkovba@crosbymichael@wlan0@jglogan