Skip to content

feat(transfer): add --inplace support for remote transfers - #2531

Merged
oferchen merged 1 commit into
masterfrom
feat/inplace-remote-transfer
Feb 27, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/inplace-remote-transfer

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds inplace: bool to ServerConfig and RequestConfig to support --inplace remote transfers
  • Modifies DiskCommitThread to open destination files directly (O_WRONLY) instead of creating temp files when inplace is enabled, matching upstream receiver.c:855
  • Wires --inplace flag through CLI server flag parser, SSH and daemon transfer paths
  • Propagates is_inplace through BeginMessage to coordinate receiver pipeline

Test plan

  • All 1005 transfer crate tests pass
  • All 4906 core+cli tests pass
  • cargo clippy --workspace --all-targets --all-features --no-deps -D warnings clean
  • Interop test: oc-rsync --inplace against upstream rsync 3.4.1
  • Verify temp files are NOT created when --inplace is active

@github-actions github-actions Bot added the enhancement New feature or request label Feb 27, 2026
Write directly to destination files instead of temp-file + rename when
--inplace is active. Mirrors upstream receiver.c:855 (O_WRONLY|O_CREAT)
and receiver.c:340 (set_file_length truncation after delta application).

Changes across the transfer pipeline:
- ServerConfig.inplace field with from_flag_string_and_args default
- RequestConfig.inplace propagated through receiver pipeline loops
- BeginMessage.is_inplace for disk commit thread open-mode selection
- Sync path (process_file_response): direct open + skip rename + truncate
- Streaming path (process_file_response_streaming): is_inplace in BeginMessage
- Disk commit: open_output_file, process_file, process_whole_file handle inplace
- CLI server: parse --inplace from ServerLongFlags
- Core: wire config.inplace() to ServerConfig for SSH and daemon transfers
@oferchen
oferchen force-pushed the feat/inplace-remote-transfer branch from 28e757d to f77c740 Compare February 27, 2026 19:00
@oferchen
oferchen merged commit 1714cf0 into master Feb 27, 2026
8 checks passed
@oferchen
oferchen deleted the feat/inplace-remote-transfer branch February 27, 2026 19:00
oferchen added a commit that referenced this pull request May 1, 2026
Write directly to destination files instead of temp-file + rename when
--inplace is active. Mirrors upstream receiver.c:855 (O_WRONLY|O_CREAT)
and receiver.c:340 (set_file_length truncation after delta application).

Changes across the transfer pipeline:
- ServerConfig.inplace field with from_flag_string_and_args default
- RequestConfig.inplace propagated through receiver pipeline loops
- BeginMessage.is_inplace for disk commit thread open-mode selection
- Sync path (process_file_response): direct open + skip rename + truncate
- Streaming path (process_file_response_streaming): is_inplace in BeginMessage
- Disk commit: open_output_file, process_file, process_whole_file handle inplace
- CLI server: parse --inplace from ServerLongFlags
- Core: wire config.inplace() to ServerConfig for SSH and daemon transfers
oferchen added a commit that referenced this pull request May 5, 2026
Write directly to destination files instead of temp-file + rename when
--inplace is active. Mirrors upstream receiver.c:855 (O_WRONLY|O_CREAT)
and receiver.c:340 (set_file_length truncation after delta application).

Changes across the transfer pipeline:
- ServerConfig.inplace field with from_flag_string_and_args default
- RequestConfig.inplace propagated through receiver pipeline loops
- BeginMessage.is_inplace for disk commit thread open-mode selection
- Sync path (process_file_response): direct open + skip rename + truncate
- Streaming path (process_file_response_streaming): is_inplace in BeginMessage
- Disk commit: open_output_file, process_file, process_whole_file handle inplace
- CLI server: parse --inplace from ServerLongFlags
- Core: wire config.inplace() to ServerConfig for SSH and daemon transfers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant