Skip to content

Commit d5485de

Browse files
cpuhrschmeta-codesync[bot]
authored andcommitted
remotemount.refresh: live mount updates without unmounting
Summary: Add MountHandler.refresh(sourcepath) for atomically updating FUSE mount data while the filesystem stays mounted. Open file handles remain valid and subsequent reads see the new data immediately. ## Walkthrough **Rust (chunked_fuse.rs):** Extract FsData struct (metadata + chunks + chunk_size) and wrap in Arc<RwLock<FsData>> shared between ChunkedFuseFs and PyMountHandle. All FUSE methods acquire a read lock (non-blocking with each other). PyMountHandle.refresh() acquires the write lock and atomically swaps the data. TTL is set to zero so the kernel always re-validates metadata after refresh. **Rust (tls_sender.rs):** Fix pre-existing flake where tcp shutdown(Write) failed with ENOTCONN when the receiver closed first. This is benign (data already sent) — now ignored instead of fatal. **Python (remotemount.py):** FUSEActor.mount() now mounts an empty FUSE filesystem and calls _do_refresh() to populate it, sharing the flush/cache/swap logic with FUSEActor.refresh_mount(). MountHandler uses a shared _sync() method for open() and refresh() that packs the source directory, diffs block hashes, transfers dirty blocks, then mounts or refreshes. refresh(sourcepath) requires the caller to pass the source path again to prevent accidentally refreshing with a forgotten path. **Tests:** 5 FUSE unit tests (TestFuseRefresh) covering data refresh, metadata refresh, open file handles across refresh, repeated refreshes, and end-to-end pack+refresh+read. 4 integration tests with actors covering refresh, open handles, no-change, and add-file scenarios. **Benchmark:** bench_fuse_read.py measures FUSE read latency and throughput vs tmpfs baseline. Reviewed By: zdevito Differential Revision: D98953121
1 parent aec5102 commit d5485de

File tree

8 files changed

+1302
-240
lines changed

8 files changed

+1302
-240
lines changed

examples/remotemount/REMOTERUN_GUIDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ Unchanged workers skip transfer entirely (metadata + remount only).
150150

151151
| Payload | Cold start | No change | Rewrite data.bin | Rewrite .py | Delete file |
152152
|---------|-----------|-----------|-----------------|-------------|-------------|
153-
| 1 GB | 9.9s | 5.9s | 9.2s | 7.9s | 6.9s |
154-
| 2 GB | 11.7s | 6.9s | 11.7s | 8.0s | 6.6s |
155-
| 4 GB | 15.9s | 7.4s | 16.2s | 8.7s | 8.1s |
156-
| 8 GB | 22.5s | 7.4s | 22.6s | 9.6s | 7.7s |
153+
| 1 GB | 9.6s | 7.7s | 10.6s | 8.4s | 8.1s |
154+
| 2 GB | 12.4s | 8.3s | 19.6s | 9.9s | 8.1s |
155+
| 4 GB | 13.7s | 8.9s | 13.7s | 9.5s | 8.6s |
156+
| 8 GB | 20.1s | 9.3s | 20.3s | 10.9s | 11.2s |
157157

158158
### Results — 64 hosts (8 streams, chunked tree fan-out, 4 leaders)
159159

0 commit comments

Comments
 (0)