Commit d5485de
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: D989531211 parent aec5102 commit d5485de
File tree
8 files changed
+1302
-240
lines changed- examples/remotemount
- monarch_extension/src
- python
- benches/remotemount
- monarch
- _rust_bindings/monarch_extension
- remotemount
- tests
8 files changed
+1302
-240
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
0 commit comments