Repository navigation
feat(ext4): mark file-backed images sparse on Windows and pre-check free space - #15
Merged
Merged
Conversation
…ree space On NTFS, extending a dense file with `set_len` and writing scattered inode tables across block groups forces Windows to physically zero-fill the entire image up to the highest written offset. - Mark newly created output files sparse on Windows via `FSCTL_SET_SPARSE` (falling back with a warning if the volume does not support sparse files), matching the default sparse behavior on Linux. - Check available volume space (accounting for blocks reclaimable from an existing output file via `GetCompressedFileSizeW`) before truncating, failing early with `ErrorKind::StorageFull` instead of risking an in-page mapping error later. - Add Windows regression tests for sparse file creation and pre-truncation disk space validation, and update `README.md` and `docs/supported-features.md`. Assisted-by: Claude Code: GLM 5.3 Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
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.
On NTFS, extending a dense file with
set_lenand writing scattered inode tables across block groups forces Windows to physically zero-fill the entire image up to the highest written offset.FSCTL_SET_SPARSE(falling back with a warning if the volume does not support sparse files), matching the default sparse behavior on Linux.GetCompressedFileSizeW) before truncating, failing early withErrorKind::StorageFullinstead of risking an in-page mapping error later.README.mdanddocs/supported-features.md.