Conflicts resolved:
- config_create signature: added both use_metadata and use_sendfile params
- config_send/config_receive: wire protocol includes both use_metadata and use_sendfile
- client.c: config_create call updated, arg parsing includes both -M/--preserve and -f/--sendfile
- test_config.c: all three config_create calls updated
- file_send_sendfile: use file->data->size instead of removed struct stat
- Remove FileReceive struct; use File everywhere with nullable FileMetadata*
- Remove struct stat from File; file size lives in Data->size (data_create_reserve)
- Add FileMetadata struct (mode, uid, gid, mtime) sent conditionally over wire
- Add -M / --preserve flag to client
- Restore permissions, ownership, timestamps on disk write
- Wire format uses per-file present flag for metadata (zero overhead when off)
- netem_apply now calls netem_reset() first to clear any leftover qdisc
- Rsync daemon startup polls TCP port instead of fixed sleep
- Dest dir cleared at start of run
Previously rsync ran as a direct local copy (rsync -aH source/ dest/), bypassing the
loopback interface entirely. This meant tc netem latency/loss/rate limits were never
applied to rsync, making the comparison fundamentally unfair.
Now rsync goes through the network via an rsync daemon on localhost:
rsync --daemon --no-detach --config=rsyncd.conf
rsync rsync://localhost:PORT/source/ dest/
The daemon is started before rsync tests and killed afterward. Both the rsync client
and FastSync client run under the same systemd-run disk I/O limits when applicable.
- Replace single 'Throttled' suite with profiles: Unlimited, LAN (default),
WAN (--wan flag)
- LAN: 1000mbit, 1ms ±0.1ms delay, 0% loss
- WAN: 100mbit, 50ms ±10ms delay, 1% loss (with --wan)
- Add jitter and packet loss to tc netem config
- Add rsync -aH (archive) and rsync -aHz (archive+compress) as comparison
- Fix verify_transfer to take the received directory directly
- --no-unlimited, --no-lan to skip profiles
- 36 tests total (10 FastSync + 2 rsync across 3 profiles)
- load_files_multithreaded skips file_load_data when sendfile is active
- -f + -m works: sendfile bypasses loader, sender uses sendfile directly
- -f combined with -c or -s prints error and exits with rc=1
- Add Sendfile + Multithreading test case
- Add file_send_sendfile() using sendfile() syscall to send file
content directly from fd to socket, bypassing userspace memory
- Add use_sendfile field to Config struct (default false)
- Add -f / --sendfile flag parsing in client.c
- sendfile path in send_chunk() used when -f is set without -c or -s
- send_files_multithreaded() falls back to single-threaded when
sendfile is enabled (loader pipeline becomes unnecessary)
- Add Sendfile (-f) test case to test.py
- Replace env var control (FASTSYNC_SOURCE_DIR, FASTSYNC_DEST_DIR,
FASTSYNC_SAVE_TO_DISK) with explicit --source-dir, --dest-dir,
--save-to-disk CLI arguments
- Keep env vars as fallback for backward compatibility
- Fix test.py: split '-c 0' into separate args ['-c', '0']
- Fix test.py: throttled suite failed because systemd-run didn't
inherit env vars; now all settings are passed as CLI args
- Add env_name to exception/timeout result entries for correct display
- Fix scanner: when chunk fills up mid-directory, save DIR handle so
remaining files in that directory are not skipped (pre-existing bug)
- Fix -c -s: add STATUS_CHUNK to protocol, send it before chunk data,
handle it on the server side for both single and multithreaded paths
- Extract chunk_serialize/chunk_deserialize from chunk_compress/decompress
- Remove dead declarations (file_receive_from_buffer, etc.)
- Fix memory leak in receive_file_receive (free -> data_destroy)
- test.py generates ~50 MB of test data across bulk files
- All 8 integration tests + 7 unit tests pass
- test.py generates its own test files in test_data/ (small.txt, medium.txt,
binary.bin, nested subtree)
- source and dest directories configurable via --source-dir / --dest-dir
- verifies all transferred files match originals byte-for-byte after each test
- waits for server to finish before verification (fixes race in multithreaded)
- all test data lives under test_data/ and is cleaned up unless --keep-data