Skip to content

Optimize delta script basis seeking and guard overflow handling - #1924

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-rsync-components
Nov 4, 2025
Merged

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

Conversation

@oferchen

@oferchen oferchen commented Nov 4, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • cache the basis offset during delta application so sequential copy tokens reuse the existing file position and guard against offset/chunk overflow
  • add regression coverage for overflow scenarios when applying delta scripts
  • document the engine agent requirements around basis-position caching in internal docs

Testing

  • cargo test -p rsync-engine

@oferchen
oferchen merged commit f4f4d4b into master Nov 4, 2025
@oferchen
oferchen deleted the implement-missing-rsync-components branch November 4, 2025 06:27
oferchen added a commit that referenced this pull request May 13, 2026
Wire the existing IORING_OP_RENAMEAT (task #1920) and IORING_OP_LINKAT
(task #1921) opcode wrappers into the temp-file commit and hardlink
finalization paths respectively.

On Linux 5.11+ with io_uring available, temp-file renames in
DestinationWriteGuard::commit_named_temp_file() now submit an
IORING_OP_RENAMEAT SQE instead of a synchronous rename(2) syscall.

On Linux 5.15+ with io_uring available, hardlink creation in
HardlinkApplyTracker, create_hard_link(), and the --link-dest path
now submit an IORING_OP_LINKAT SQE instead of a synchronous link(2).

Both paths fall back transparently to std::fs::rename / std::fs::hard_link
on non-Linux platforms, older kernels, or when io_uring is disabled.

Two new convenience functions in fast_io expose the try-or-fallback
pattern: try_rename_via_io_uring() and try_hard_link_via_io_uring(),
returning Option<io::Result<()>> so callers can fall through to the
portable implementation when None is returned.

Closes #1924, closes #1925.
oferchen added a commit that referenced this pull request May 13, 2026
…1924) (#3992)

Wire the existing fast_io io_uring RENAMEAT2 and LINKAT opcode wrappers
into the transfer crate's disk-commit thread and hardlink creation paths
for remote transfers. On Linux 5.11+ (RENAMEAT2) and 5.15+ (LINKAT),
these operations are submitted as io_uring SQEs instead of synchronous
syscalls. All other platforms fall back to std::fs::rename and
std::fs::hard_link transparently.

Three call sites updated:
- disk_commit::process::commit_file - temp-file rename after write
- receiver::directory::links::create_hardlinks - follower hard links
- receiver::quick_check::try_reference_dest - link-dest hard links
oferchen added a commit that referenced this pull request May 18, 2026
Wire the existing IORING_OP_RENAMEAT (task #1920) and IORING_OP_LINKAT
(task #1921) opcode wrappers into the temp-file commit and hardlink
finalization paths respectively.

On Linux 5.11+ with io_uring available, temp-file renames in
DestinationWriteGuard::commit_named_temp_file() now submit an
IORING_OP_RENAMEAT SQE instead of a synchronous rename(2) syscall.

On Linux 5.15+ with io_uring available, hardlink creation in
HardlinkApplyTracker, create_hard_link(), and the --link-dest path
now submit an IORING_OP_LINKAT SQE instead of a synchronous link(2).

Both paths fall back transparently to std::fs::rename / std::fs::hard_link
on non-Linux platforms, older kernels, or when io_uring is disabled.

Two new convenience functions in fast_io expose the try-or-fallback
pattern: try_rename_via_io_uring() and try_hard_link_via_io_uring(),
returning Option<io::Result<()>> so callers can fall through to the
portable implementation when None is returned.

Closes #1924, closes #1925.
oferchen added a commit that referenced this pull request May 18, 2026
…1924) (#3992)

Wire the existing fast_io io_uring RENAMEAT2 and LINKAT opcode wrappers
into the transfer crate's disk-commit thread and hardlink creation paths
for remote transfers. On Linux 5.11+ (RENAMEAT2) and 5.15+ (LINKAT),
these operations are submitted as io_uring SQEs instead of synchronous
syscalls. All other platforms fall back to std::fs::rename and
std::fs::hard_link transparently.

Three call sites updated:
- disk_commit::process::commit_file - temp-file rename after write
- receiver::directory::links::create_hardlinks - follower hard links
- receiver::quick_check::try_reference_dest - link-dest hard links
oferchen added a commit that referenced this pull request Aug 24, 2026
Wire the existing IORING_OP_RENAMEAT (task #1920) and IORING_OP_LINKAT
(task #1921) opcode wrappers into the temp-file commit and hardlink
finalization paths respectively.

On Linux 5.11+ with io_uring available, temp-file renames in
DestinationWriteGuard::commit_named_temp_file() now submit an
IORING_OP_RENAMEAT SQE instead of a synchronous rename(2) syscall.

On Linux 5.15+ with io_uring available, hardlink creation in
HardlinkApplyTracker, create_hard_link(), and the --link-dest path
now submit an IORING_OP_LINKAT SQE instead of a synchronous link(2).

Both paths fall back transparently to std::fs::rename / std::fs::hard_link
on non-Linux platforms, older kernels, or when io_uring is disabled.

Two new convenience functions in fast_io expose the try-or-fallback
pattern: try_rename_via_io_uring() and try_hard_link_via_io_uring(),
returning Option<io::Result<()>> so callers can fall through to the
portable implementation when None is returned.

Closes #1924, closes #1925.
oferchen added a commit that referenced this pull request Aug 24, 2026
…1924) (#3992)

Wire the existing fast_io io_uring RENAMEAT2 and LINKAT opcode wrappers
into the transfer crate's disk-commit thread and hardlink creation paths
for remote transfers. On Linux 5.11+ (RENAMEAT2) and 5.15+ (LINKAT),
these operations are submitted as io_uring SQEs instead of synchronous
syscalls. All other platforms fall back to std::fs::rename and
std::fs::hard_link transparently.

Three call sites updated:
- disk_commit::process::commit_file - temp-file rename after write
- receiver::directory::links::create_hardlinks - follower hard links
- receiver::quick_check::try_reference_dest - link-dest hard links
oferchen added a commit that referenced this pull request Aug 24, 2026
Wire the existing IORING_OP_RENAMEAT (task #1920) and IORING_OP_LINKAT
(task #1921) opcode wrappers into the temp-file commit and hardlink
finalization paths respectively.

On Linux 5.11+ with io_uring available, temp-file renames in
DestinationWriteGuard::commit_named_temp_file() now submit an
IORING_OP_RENAMEAT SQE instead of a synchronous rename(2) syscall.

On Linux 5.15+ with io_uring available, hardlink creation in
HardlinkApplyTracker, create_hard_link(), and the --link-dest path
now submit an IORING_OP_LINKAT SQE instead of a synchronous link(2).

Both paths fall back transparently to std::fs::rename / std::fs::hard_link
on non-Linux platforms, older kernels, or when io_uring is disabled.

Two new convenience functions in fast_io expose the try-or-fallback
pattern: try_rename_via_io_uring() and try_hard_link_via_io_uring(),
returning Option<io::Result<()>> so callers can fall through to the
portable implementation when None is returned.

Closes #1924, closes #1925.
oferchen added a commit that referenced this pull request Aug 24, 2026
…1924) (#3992)

Wire the existing fast_io io_uring RENAMEAT2 and LINKAT opcode wrappers
into the transfer crate's disk-commit thread and hardlink creation paths
for remote transfers. On Linux 5.11+ (RENAMEAT2) and 5.15+ (LINKAT),
these operations are submitted as io_uring SQEs instead of synchronous
syscalls. All other platforms fall back to std::fs::rename and
std::fs::hard_link transparently.

Three call sites updated:
- disk_commit::process::commit_file - temp-file rename after write
- receiver::directory::links::create_hardlinks - follower hard links
- receiver::quick_check::try_reference_dest - link-dest hard links
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