Skip to content

docs(design): plan Windows FSCTL_SET_ZERO_DATA hole-punching (#2131) - #3924

Merged
oferchen merged 1 commit into
masterfrom
design/windows-fsctl-set-zero-data
May 7, 2026
Merged

oferchen merged 1 commit into
masterfrom
design/windows-fsctl-set-zero-data

Conversation

@oferchen

@oferchen oferchen commented May 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds docs/design/windows-fsctl-set-zero-data.md outlining the
    Windows backend for sparse hole punching: FSCTL_SET_ZERO_DATA
    via DeviceIoControl with FILE_ZERO_DATA_INFORMATION.
  • Captures Unix baselines (fallocate(PUNCH_HOLE) on Linux,
    F_PUNCHHOLE on macOS) and the NTFS-only pre-conditions
    (FSCTL_SET_SPARSE, cluster alignment, FAT32/exFAT no-op).
  • Defines a PlatformSparse trait shape with set_sparse_attr
    and punch_hole, integrated either by extending PlatformCopy
    or as a sibling trait used by the sparse-writer Decorator
    (Document parity artifacts and automation #2132). Cross-refs the --sparse-detect= work in Derive Default for PanicState #1828.

Test plan

  • Design review only - no code changes.
  • Confirm cluster-alignment guidance matches NTFS behaviour.
  • Confirm windows crate (microsoft/windows-rs) is the
    preferred binding (per project unsafe policy).

Plans an NTFS sparse hole-punching backend so the Windows path
matches Linux fallocate(PUNCH_HOLE) and macOS F_PUNCHHOLE instead
of writing physical zeros. Defines PlatformSparse trait shape
(set_sparse_attr + punch_hole), volume/alignment risks, and ties
into the sparse-writer Decorator tracked in #2132.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 7, 2026
@oferchen
oferchen merged commit d1c7666 into master May 7, 2026
8 checks passed
@oferchen
oferchen deleted the design/windows-fsctl-set-zero-data branch May 8, 2026 03:50
oferchen added a commit that referenced this pull request May 18, 2026
…3924)

Plans an NTFS sparse hole-punching backend so the Windows path
matches Linux fallocate(PUNCH_HOLE) and macOS F_PUNCHHOLE instead
of writing physical zeros. Defines PlatformSparse trait shape
(set_sparse_attr + punch_hole), volume/alignment risks, and ties
into the sparse-writer Decorator tracked in #2132.
oferchen added a commit that referenced this pull request Aug 24, 2026
…3924)

Plans an NTFS sparse hole-punching backend so the Windows path
matches Linux fallocate(PUNCH_HOLE) and macOS F_PUNCHHOLE instead
of writing physical zeros. Defines PlatformSparse trait shape
(set_sparse_attr + punch_hole), volume/alignment risks, and ties
into the sparse-writer Decorator tracked in #2132.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant