Skip to content

Coalesce sparse zero runs across chunks#2139

Merged
oferchen merged 1 commit into
masterfrom
implement-rsync-3.4.1-parity-in-oc-rsync
Nov 13, 2025
Merged

Coalesce sparse zero runs across chunks#2139
oferchen merged 1 commit into
masterfrom
implement-rsync-3.4.1-parity-in-oc-rsync

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • introduce a SparseWriteState helper that tracks pending zero spans so sparse writes coalesce contiguous holes instead of seeking per buffer
  • update both the regular and delta transfer paths to use the new sparse state and flush pending zeros before final truncation
  • extend the sparse writer unit tests to cover multi-chunk zero runs and trailing zero holes

Testing

  • cargo check

Codex Task

@oferchen oferchen merged commit aff512d into master Nov 13, 2025
@oferchen oferchen deleted the implement-rsync-3.4.1-parity-in-oc-rsync branch November 13, 2025 20:25
oferchen added a commit that referenced this pull request May 14, 2026
Mirrors upstream rsync 3.4.1 behaviour at checksum.c:197-198 where
parse_checksum_choice unconditionally sets whole_file = 1 when the
negotiated transfer checksum is CSUM_NONE. The delta algorithm cannot
run without a transfer checksum, so whole-file transfer is the only
valid mode.

Changes:
- Add StrongChecksumAlgorithm::None and accept `none` (case-insensitive)
  via --checksum-choice/--cc, forwarding it to the remote peer.
- ClientConfigBuilder::build now promotes whole_file to Some(true)
  whenever checksum_choice.transfer_is_none(); explicit --no-whole-file
  is silently overridden (matching upstream's unconditional assignment).
- Regression tests at the builder layer
  (checksum_choice_none_promotes_whole_file,
  checksum_choice_none_overrides_explicit_no_whole_file) and at the CLI
  parser layer (test_checksum_choice_none_parses, _via_cc_alias).
- Refresh the mutual-exclusion audit matrix and oc-rsync(1) man page so
  `none` is documented; mark G1 RESOLVED.

Closes #2139, #2140, #2141.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant