Skip to content

feat(fast_io): wire IORING_OP_LINKAT into hardlink finalization (#1925) - #4003

Merged
oferchen merged 2 commits into
masterfrom
feat/io-uring-linkat-hardlink-1925
May 13, 2026
Merged

oferchen merged 2 commits into
masterfrom
feat/io-uring-linkat-hardlink-1925

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add fast_io::hard_link() convenience function that tries io_uring IORING_OP_LINKAT on Linux 5.15+ and falls back to std::fs::hard_link on all other platforms/kernels.
  • Replace four duplicate hard_link_with_io_uring_fallback() private functions across engine::local_copy::executor::file::copy::links, engine::local_copy::hard_links, transfer::receiver::quick_check, and transfer::receiver::directory::links with the new centralized fast_io::hard_link() API.
  • Simplify engine::local_copy::overrides::create_hard_link() to delegate to fast_io::hard_link() instead of inlining the try-then-fallback pattern.

All hardlink creation paths - link-dest linking, inode-based deduplication, reference directory linking, receiver hardlink finalization, and quick-check link-dest handling - now route through the single fast_io::hard_link() entry point.

Test plan

  • New hard_link_convenience_tests in fast_io verify: link creation, inode sharing (Unix), EEXIST failure, missing-source failure, and shared-data semantics.
  • Existing tests in engine::local_copy::hard_links, transfer::receiver::directory::links, and transfer::receiver::quick_check updated to use fast_io::hard_link() directly.
  • CI: fmt+clippy, nextest (stable), Windows (stable), macOS (stable), Linux musl (stable).

@oferchen oferchen closed this May 13, 2026
@oferchen oferchen reopened this May 13, 2026
@oferchen
oferchen force-pushed the feat/io-uring-linkat-hardlink-1925 branch from 4c2cb25 to a1aa956 Compare May 13, 2026 20:05
Add `fast_io::hard_link()` convenience function that tries io_uring
LINKAT on Linux 5.15+ and falls back to `std::fs::hard_link`. Replace
four duplicate `hard_link_with_io_uring_fallback()` private functions
across engine and transfer crates with the new centralized API.
@oferchen
oferchen force-pushed the feat/io-uring-linkat-hardlink-1925 branch from a1aa956 to 26be320 Compare May 13, 2026 20:14
@oferchen
oferchen merged commit 6ddeb95 into master May 13, 2026
38 of 39 checks passed
@oferchen
oferchen deleted the feat/io-uring-linkat-hardlink-1925 branch May 14, 2026 14:57
oferchen added a commit that referenced this pull request May 18, 2026
… (#4003)

* feat(fast_io): wire IORING_OP_LINKAT into hardlink finalization (#1925)

Add `fast_io::hard_link()` convenience function that tries io_uring
LINKAT on Linux 5.15+ and falls back to `std::fs::hard_link`. Replace
four duplicate `hard_link_with_io_uring_fallback()` private functions
across engine and transfer crates with the new centralized API.

* fix: remove unused std::io import in directory links
oferchen added a commit that referenced this pull request Jun 10, 2026
Bundles the PIP-LESSONS series (#4000-#4003) as a single docs change:

- docs/design/pip-7-lessons-learned.md captures the broader lesson from
  the PIP-7 receiver-corruption defect. The defect post-mortem already
  lives in pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md;
  this new doc generalises it: sequential-ordering unit tests passed,
  the corruption only surfaced under adversarial chunk arrival at the
  dispatch boundary. The discipline applies to every future concurrent
  path (DASYNC, RUSSH-ASY, ASY-G, DG-series races): ship adversarial-
  ordering stress fuzz BEFORE flipping default-on.

- fuzz/fuzz_targets/parallel_receive_delta_adversarial.rs drives
  ParallelDeltaApplier with adversarial chunk orderings and asserts a
  SHA-256 oracle against the sequential reference.

- fuzz/corpus/parallel_receive_delta_adversarial/ seeds the corpus with
  the two known regression shapes:
    - pip_7_threshold_trip.bin: the threshold-trip mid-batch ordering
      that caught PIP-7 (file_0 dispatched after later files).
    - dg_3_slot_recycle_race.bin: the reverse-interleaved ordering that
      stresses the slot-recycle race shape from the DG-3 series.

- fuzz/Cargo.toml: adds engine and sha2 deps for the new target.
oferchen added a commit that referenced this pull request Jun 10, 2026
…ry (#5596)

Bundles the PIP-LESSONS series (#4000-#4003) as a single docs change:

- docs/design/pip-7-lessons-learned.md captures the broader lesson from
  the PIP-7 receiver-corruption defect. The defect post-mortem already
  lives in pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md;
  this new doc generalises it: sequential-ordering unit tests passed,
  the corruption only surfaced under adversarial chunk arrival at the
  dispatch boundary. The discipline applies to every future concurrent
  path (DASYNC, RUSSH-ASY, ASY-G, DG-series races): ship adversarial-
  ordering stress fuzz BEFORE flipping default-on.

- fuzz/fuzz_targets/parallel_receive_delta_adversarial.rs drives
  ParallelDeltaApplier with adversarial chunk orderings and asserts a
  SHA-256 oracle against the sequential reference.

- fuzz/corpus/parallel_receive_delta_adversarial/ seeds the corpus with
  the two known regression shapes:
    - pip_7_threshold_trip.bin: the threshold-trip mid-batch ordering
      that caught PIP-7 (file_0 dispatched after later files).
    - dg_3_slot_recycle_race.bin: the reverse-interleaved ordering that
      stresses the slot-recycle race shape from the DG-3 series.

- fuzz/Cargo.toml: adds engine and sha2 deps for the new target.
oferchen added a commit that referenced this pull request Aug 24, 2026
… (#4003)

* feat(fast_io): wire IORING_OP_LINKAT into hardlink finalization (#1925)

Add `fast_io::hard_link()` convenience function that tries io_uring
LINKAT on Linux 5.15+ and falls back to `std::fs::hard_link`. Replace
four duplicate `hard_link_with_io_uring_fallback()` private functions
across engine and transfer crates with the new centralized API.

* fix: remove unused std::io import in directory links
oferchen added a commit that referenced this pull request Aug 24, 2026
… (#4003)

* feat(fast_io): wire IORING_OP_LINKAT into hardlink finalization (#1925)

Add `fast_io::hard_link()` convenience function that tries io_uring
LINKAT on Linux 5.15+ and falls back to `std::fs::hard_link`. Replace
four duplicate `hard_link_with_io_uring_fallback()` private functions
across engine and transfer crates with the new centralized API.

* fix: remove unused std::io import in directory links
oferchen added a commit that referenced this pull request Aug 24, 2026
…ry (#5596)

Bundles the PIP-LESSONS series (#4000-#4003) as a single docs change:

- docs/design/pip-7-lessons-learned.md captures the broader lesson from
  the PIP-7 receiver-corruption defect. The defect post-mortem already
  lives in pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md;
  this new doc generalises it: sequential-ordering unit tests passed,
  the corruption only surfaced under adversarial chunk arrival at the
  dispatch boundary. The discipline applies to every future concurrent
  path (DASYNC, RUSSH-ASY, ASY-G, DG-series races): ship adversarial-
  ordering stress fuzz BEFORE flipping default-on.

- fuzz/fuzz_targets/parallel_receive_delta_adversarial.rs drives
  ParallelDeltaApplier with adversarial chunk orderings and asserts a
  SHA-256 oracle against the sequential reference.

- fuzz/corpus/parallel_receive_delta_adversarial/ seeds the corpus with
  the two known regression shapes:
    - pip_7_threshold_trip.bin: the threshold-trip mid-batch ordering
      that caught PIP-7 (file_0 dispatched after later files).
    - dg_3_slot_recycle_race.bin: the reverse-interleaved ordering that
      stresses the slot-recycle race shape from the DG-3 series.

- fuzz/Cargo.toml: adds engine and sha2 deps for the new target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant