Skip to content

perf(transfer): wire io_uring RENAMEAT2/LINKAT into disk-commit path (#1924) - #3992

Merged
oferchen merged 1 commit into
masterfrom
perf/io-uring-rename-linkat-1924
May 13, 2026
Merged

oferchen merged 1 commit into
masterfrom
perf/io-uring-rename-linkat-1924

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Wire existing fast_io::try_rename_via_io_uring() into the transfer crate's disk-commit thread for temp-file renames after writes, matching the pattern already used in the engine crate's local-copy executor
  • Wire existing fast_io::try_hard_link_via_io_uring() into both hardlink creation paths: follower hard links in receiver::directory::links and link-dest hard links in receiver::quick_check
  • On Linux 5.11+ (RENAMEAT2) and 5.15+ (LINKAT), these operations are submitted as io_uring SQEs instead of synchronous rename(2) / link(2) syscalls; all other platforms fall back to std::fs transparently

Test plan

  • New unit tests for rename_with_io_uring_fallback verify rename succeeds, replaces existing files, and fails for missing source
  • New unit tests for hard_link_with_io_uring_fallback in both links.rs and quick_check.rs verify hard link creation, inode sharing (Unix), and error on existing destination
  • New integration tests via spawn_disk_thread exercise the full commit path with io_uring Auto policy
  • Consistency tests verify io_uring availability does not change between calls
  • All tests pass on non-Linux (macOS, Windows) via the transparent None fallback from try_rename_via_io_uring / try_hard_link_via_io_uring
  • CI: fmt+clippy, nextest (stable), Windows, macOS, Linux musl

Closes #1924, closes #1925

…1924)

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
oferchen merged commit 35f5b70 into master May 13, 2026
65 of 66 checks passed
@oferchen
oferchen deleted the perf/io-uring-rename-linkat-1924 branch May 14, 2026 14:58
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
…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
…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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant