Repository navigation
fs: Report corrupted exFAT as not clean instead of failing - #1
Closed
davidvornholt wants to merge 1 commit into
Closed
davidvornholt wants to merge 1 commit into
davidvornholt wants to merge 1 commit into
Conversation
fsck.exfat from exfatprogs exits with 4 when it finds errors it didn't fix, which is always the case with "-n". bd_fs_exfat_check only cleared the error for exit code 1, so checking a corrupted exFAT file system failed with an error instead of returning FALSE. The ext check already handles exit code 4 the same way. Assisted-by: Claude Code (Claude Opus 5.5)
Owner
Author
Review and fix
Gate: libblockdev builds with nix, and
The premise reviewer found upstream issue storaged-project#1225 for the version-helper problem; the upstream PR description links it. Remaining risk: the change wasn't run in the upstream suite as root on LIO devices. Upstream CI covers that once the PR is opened there. |
davidvornholt
marked this pull request as ready for review
November 13, 2026 14:09
Owner
Author
|
Sent upstream as storaged-project#1226. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
bd_fs_exfat_checkfails with an error on a corrupted exFAT file system instead of returningFALSE.fsck.exfatfrom exfatprogs exits with 4 (FSCK_EXIT_ERRORS_LEFT) whenever it finds errors it didn't fix, which with-nmeans any error, but the check only cleared the error for exit code 1. udisks passes that error on, soFilesystem.Checkfails with "Error checking filesystem" instead of returningfalse. The ext check already treats exit code 4 this way.The new test zeroes the checksum sector of the main boot region, then expects the check to return
FALSE, the repair to succeed and a second check to returnTRUE. Without the fix it fails with "Process reported exit code 4".I ran
ExfatTestCheckandExfatTestRepairwith exfatprogs 1.4.4 on plain image files instead of LIO devices, because I can't run the suite as root here. While doing that I noticed that exfatprogs 1.4.4 prints its version to stderr, so_get_exfatprogs_versioninexfat_test.pydoesn't find it. I worked around that locally and left it out of this PR.I used Claude Code (Claude Opus 5.5) to investigate, write and test this change and this description, and reviewed both myself.