Phase 2: implement -x / --one-file-system #261

Closed
TapTap wants to merge 0 commits from feat/p2-one-file-system into dev
Owner

Implements rsync -x/--one-file-system (sender side): the scanner does not cross filesystem boundaries, in both single-threaded and -m parallel scanning. Default behavior unchanged. Unit tests (pure decision + sequential/parallel plumbing + rootless cross-device test via /dev/shm symlink), integration TestOneFileSystem incl. a root-gated tmpfs mount test. Independent c-review: APPROVE WITH NITS, all nits fixed. Client-only; no wire/protocol change.

Implements rsync `-x`/`--one-file-system` (sender side): the scanner does not cross filesystem boundaries, in both single-threaded and `-m` parallel scanning. Default behavior unchanged. Unit tests (pure decision + sequential/parallel plumbing + rootless cross-device test via /dev/shm symlink), integration TestOneFileSystem incl. a root-gated tmpfs mount test. Independent c-review: APPROVE WITH NITS, all nits fixed. Client-only; no wire/protocol change.
TapTap added 2 commits 2026-09-06 12:51:02 +02:00
Capture the transfer root's device (st_dev) at scanner creation and skip
descending into any subdirectory on a different device (a mount point).
Implemented sender/client-side only: sequential BFS and parallel (-m) root
scan apply the same scanner_same_filesystem decision; no wire/protocol change
and default behavior is unchanged. Unit tests cover the pure decision, same
device scanning in both modes, and CLI parsing; integration tests prove -x
leaves a single-filesystem tree byte-identical and, when root can mount a
tmpfs, skips a genuine cross-device subtree.
test: cover -x cross-device skip without root; harden OneFileSystem tests
CI / lint (pull_request) Failing after 20s
CI / build-and-test (pull_request) Skipped
CI / sanitizers (address) (pull_request) Skipped
CI / sanitizers (undefined) (pull_request) Skipped
CI / fuzz-build (pull_request) Skipped
CI / coverage (pull_request) Skipped
CI / valgrind (pull_request) Skipped
2d841405e6
Add a rootless unit test that reaches the actual st_dev skip branch in both
the sequential and parallel (-m) scanners: a symlink nested under the scan
root points at a directory on /dev/shm (a different device than the build
fs) and, under --copy-links semantics, -x must drop that subtree while a
plain scan includes it. Skips only when no cross-device target exists.
Integration OneFileSystem test now cleans both dest dirs up front and
reports a busy test mountpoint instead of ignoring the umount result.
RSYNC_COMPAT.md notes that cross-filesystem mount-point subdirectories are
dropped entirely (rsync parity).
Author
Owner

Merged into dev via commit f91ca70.

Implemented and merged to dev (f91ca70). Independent c-review: APPROVE WITH NITS; nits fixed (rootless cross-device scanner test via /dev/shm symlink for both sequential and -m workers, hermetic mount integration test, rsync parity note). dev CI run #466 all green. Closing as merged.

**Merged into dev** via commit f91ca70. Implemented and merged to dev (f91ca70). Independent c-review: APPROVE WITH NITS; nits fixed (rootless cross-device scanner test via /dev/shm symlink for both sequential and -m workers, hermetic mount integration test, rsync parity note). dev CI run #466 all green. Closing as merged.
TapTap closed this pull request 2026-09-06 12:59:19 +02:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#261