Skip to content

Fix oc-rsyncd test config section#1923

Merged
oferchen merged 1 commit into
masterfrom
fix-rsync-config-path-directive-issue
Nov 4, 2025
Merged

Fix oc-rsyncd test config section#1923
oferchen merged 1 commit into
masterfrom
fix-rsync-config-path-directive-issue

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 4, 2025

Summary

  • add the required path directive to the oc-rsyncd interop configuration template so the module section parses correctly

Testing

  • bash tools/ci/run_interop.sh (fails: current oc-rsyncd still rejects --daemon)

https://chatgpt.com/codex/tasks/task_e_690951d9cd90832396fc1796dd8da8f1

@oferchen oferchen merged commit 27e80f8 into master Nov 4, 2025
@oferchen oferchen deleted the fix-rsync-config-path-directive-issue branch November 4, 2025 01:25
oferchen added a commit that referenced this pull request May 6, 2026
Closes #1921, #1923.

Adds a typed wrapper around `IORING_OP_LINKAT` (Linux 5.15+) so the
receiver can submit hardlink creation alongside disk writes on the same
ring instead of issuing a synchronous `linkat(2)` syscall per hardlinked
file.

The new `linkat` submodule mirrors the conventions used by
`shared_ring::probe_poll_add` and `splice::is_splice_available`:

- `LINKAT_MIN_KERNEL = (5, 15)` and `IORING_OP_LINKAT = 39` constants.
- `linkat_supported()` short-circuits on `is_io_uring_available()`,
  builds a throwaway ring, and asks the kernel via
  `IORING_REGISTER_PROBE` whether opcode 39 is supported. The result is
  cached in a process-wide `OnceLock`.
- `LinkAtArgs<'a>` borrows source/destination `&CStr` paths plus dirfds
  and `flags` so the compiler enforces the kernel's path lifetime
  contract.
- `build_linkat_sqe` returns `io::ErrorKind::Unsupported` when the probe
  is `false`; `build_linkat_sqe_unchecked` exposes the encoder for unit
  tests.
- `submit_linkat_blocking` builds a private 2-entry ring, submits the
  SQE, and returns the kernel's CQE result.

The non-Linux stub in `io_uring_stub.rs` provides the same names with
`linkat_supported() -> false` and `Unsupported` round-trips. Public
re-exports in `crates/fast_io/src/lib.rs` and the Linux `io_uring`
module make the API available to consumer crates.

Tests:

- Unit tests verify `opcode::LinkAt::CODE == 39`, the cached probe is
  idempotent, the unchecked SQE encoder accepts user_data, and the stub
  consistently returns `Unsupported`.
- `tests/io_uring_linkat.rs` (Linux+`io_uring` feature) submits a real
  LINKAT, verifies the destination hardlink, and unlinks it; skips when
  the kernel does not advertise the opcode.
oferchen added a commit that referenced this pull request May 6, 2026
* feat(fast_io): add io_uring LINKAT wrapper and kernel probe

Closes #1921, #1923.

Adds a typed wrapper around `IORING_OP_LINKAT` (Linux 5.15+) so the
receiver can submit hardlink creation alongside disk writes on the same
ring instead of issuing a synchronous `linkat(2)` syscall per hardlinked
file.

The new `linkat` submodule mirrors the conventions used by
`shared_ring::probe_poll_add` and `splice::is_splice_available`:

- `LINKAT_MIN_KERNEL = (5, 15)` and `IORING_OP_LINKAT = 39` constants.
- `linkat_supported()` short-circuits on `is_io_uring_available()`,
  builds a throwaway ring, and asks the kernel via
  `IORING_REGISTER_PROBE` whether opcode 39 is supported. The result is
  cached in a process-wide `OnceLock`.
- `LinkAtArgs<'a>` borrows source/destination `&CStr` paths plus dirfds
  and `flags` so the compiler enforces the kernel's path lifetime
  contract.
- `build_linkat_sqe` returns `io::ErrorKind::Unsupported` when the probe
  is `false`; `build_linkat_sqe_unchecked` exposes the encoder for unit
  tests.
- `submit_linkat_blocking` builds a private 2-entry ring, submits the
  SQE, and returns the kernel's CQE result.

The non-Linux stub in `io_uring_stub.rs` provides the same names with
`linkat_supported() -> false` and `Unsupported` round-trips. Public
re-exports in `crates/fast_io/src/lib.rs` and the Linux `io_uring`
module make the API available to consumer crates.

Tests:

- Unit tests verify `opcode::LinkAt::CODE == 39`, the cached probe is
  idempotent, the unchecked SQE encoder accepts user_data, and the stub
  consistently returns `Unsupported`.
- `tests/io_uring_linkat.rs` (Linux+`io_uring` feature) submits a real
  LINKAT, verifies the destination hardlink, and unlinks it; skips when
  the kernel does not advertise the opcode.

* fix(fast_io): use io::Error::other for clippy::io_other_error

* fix(fast_io): use c"..." CStr literals to satisfy clippy manual_c_str_literals
oferchen added a commit that referenced this pull request May 18, 2026
* feat(fast_io): add io_uring LINKAT wrapper and kernel probe

Closes #1921, #1923.

Adds a typed wrapper around `IORING_OP_LINKAT` (Linux 5.15+) so the
receiver can submit hardlink creation alongside disk writes on the same
ring instead of issuing a synchronous `linkat(2)` syscall per hardlinked
file.

The new `linkat` submodule mirrors the conventions used by
`shared_ring::probe_poll_add` and `splice::is_splice_available`:

- `LINKAT_MIN_KERNEL = (5, 15)` and `IORING_OP_LINKAT = 39` constants.
- `linkat_supported()` short-circuits on `is_io_uring_available()`,
  builds a throwaway ring, and asks the kernel via
  `IORING_REGISTER_PROBE` whether opcode 39 is supported. The result is
  cached in a process-wide `OnceLock`.
- `LinkAtArgs<'a>` borrows source/destination `&CStr` paths plus dirfds
  and `flags` so the compiler enforces the kernel's path lifetime
  contract.
- `build_linkat_sqe` returns `io::ErrorKind::Unsupported` when the probe
  is `false`; `build_linkat_sqe_unchecked` exposes the encoder for unit
  tests.
- `submit_linkat_blocking` builds a private 2-entry ring, submits the
  SQE, and returns the kernel's CQE result.

The non-Linux stub in `io_uring_stub.rs` provides the same names with
`linkat_supported() -> false` and `Unsupported` round-trips. Public
re-exports in `crates/fast_io/src/lib.rs` and the Linux `io_uring`
module make the API available to consumer crates.

Tests:

- Unit tests verify `opcode::LinkAt::CODE == 39`, the cached probe is
  idempotent, the unchecked SQE encoder accepts user_data, and the stub
  consistently returns `Unsupported`.
- `tests/io_uring_linkat.rs` (Linux+`io_uring` feature) submits a real
  LINKAT, verifies the destination hardlink, and unlinks it; skips when
  the kernel does not advertise the opcode.

* fix(fast_io): use io::Error::other for clippy::io_other_error

* fix(fast_io): use c"..." CStr literals to satisfy clippy manual_c_str_literals
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