Skip to content

Fix the hardlink count decrement threshold and unlink cleanup#610

Open
dkovba wants to merge 5 commits intoapple:mainfrom
dkovba:hardlink-count
Open

Fix the hardlink count decrement threshold and unlink cleanup#610
dkovba wants to merge 5 commits intoapple:mainfrom
dkovba:hardlink-count

Conversation

@dkovba
Copy link
Copy Markdown
Contributor

@dkovba dkovba commented Mar 30, 2026

  • 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 wlan0 March 30, 2026 21:37
@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
Contributor Author

dkovba commented Mar 30, 2026

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

@dkovba dkovba changed the title Fix a hardlink count decrement threshold Fix a hardlink count decrement threshold and the unlink cleanup Mar 30, 2026
@dkovba dkovba changed the title Fix a hardlink count decrement threshold and the unlink cleanup Fix the hardlink count decrement threshold and unlink cleanup Mar 30, 2026
@dkovba dkovba requested a review from wlan0 March 31, 2026 01:12
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.

2 participants