Skip to content

Sanitize fallback bwlimit argument - #1148

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-components-for-rsync-efql3t
Oct 26, 2025
Merged

oferchen merged 1 commit into
masterfrom
implement-missing-components-for-rsync-efql3t

Conversation

@oferchen

@oferchen oferchen commented Oct 26, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • normalize the --bwlimit value passed to remote fallback invocations so older rsync binaries accept the argument
  • ensure unlimited limits continue to map to 0 when the fallback path is used
  • add regression coverage that validates the sanitised value recorded by the fallback shim
  • document the normalisation contract on RemoteFallbackArgs

Testing

  • cargo test

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/cli/src/lib.rs
Comment on lines +2892 to +2895
let fallback_bwlimit = match (bandwidth_limit.as_ref(), bwlimit.as_ref()) {
(Some(limit), _) => Some(OsString::from(limit.bytes_per_second().get().to_string())),
(None, Some(_)) => Some(OsString::from("0")),
(None, None) => None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Convert bwlimit to KiB for fallback invocation

The new fallback_bwlimit serialises BandwidthLimit using limit.bytes_per_second().get() before passing it to the remote fallback, but upstream rsync interprets plain numeric --bwlimit arguments as kilobytes per second. This means a user-specified limit is now multiplied by roughly 1024 when the fallback binary is invoked (e.g. --bwlimit=1M becomes --bwlimit 1048576, i.e. ~1 GB/s instead of 1 MB/s). Any remote transfer that hits the fallback path will ignore the user’s intended cap. The value should be converted to KiB/s (or the original text preserved) before forwarding.

Useful? React with 👍 / 👎.

@oferchen
oferchen merged commit c6fb135 into master Oct 26, 2025
@oferchen
oferchen deleted the implement-missing-components-for-rsync-efql3t branch October 26, 2025 08:57
oferchen added a commit that referenced this pull request May 7, 2026
Document the Windows ERROR_DISK_FULL test plan for the IOCP
disk-commit path: VHD-backed limited-capacity volume, fatal error
categorisation, completion-port drain on failure, and exit-code
mapping to RERR_FILEIO. Mirrors the Linux ENOSPC coverage filed
under #1148.
oferchen added a commit that referenced this pull request May 18, 2026
Document the Windows ERROR_DISK_FULL test plan for the IOCP
disk-commit path: VHD-backed limited-capacity volume, fatal error
categorisation, completion-port drain on failure, and exit-code
mapping to RERR_FILEIO. Mirrors the Linux ENOSPC coverage filed
under #1148.
oferchen added a commit that referenced this pull request Aug 24, 2026
Document the Windows ERROR_DISK_FULL test plan for the IOCP
disk-commit path: VHD-backed limited-capacity volume, fatal error
categorisation, completion-port drain on failure, and exit-code
mapping to RERR_FILEIO. Mirrors the Linux ENOSPC coverage filed
under #1148.
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