refactor(fuse): one tree for every mount

On-demand sync folders kept their own State, which the drain, the
event applier and the sweeps had to visit one by one (B74). Every mount
now serves from the primary's tree. A session keeps only its root, which
the kernel knows as inode 1, and its notification channel; work that
changes the tree tells every mounted session. Size upgrades become
daemon-wide, and moves compare mounts by root instead of by state.
This commit is contained in:
nvrl committed 2026-10-03 16:53:31 +02:00
1 parent ea27f2bcd0
commit ad8b225cfd
12 files changed
+580 -622

No files matched your search

+3 -2
View File
@@ -17,7 +17,7 @@ use proton_drive_rs::proton_sdk::api::ResponseCode;
use proton_drive_rs::proton_sdk::error::{ProtonApiError, ProtonError};
use tracing::{debug, info, warn};
use crate::{Core, ONLINE_PROBE_MAX, ONLINE_PROBE_MIN, ROOT_INO};
use crate::{Core, ONLINE_PROBE_MAX, ONLINE_PROBE_MIN};
/// How long a remote call a FUSE handler is waiting on may take before the link
/// is treated as down.
@@ -258,8 +258,9 @@ impl Core {
match probe {
Ok(root) => {
{
let root_ino = self.root_ino();
let mut st = self.state();
if let Some(e) = st.entries.get_mut(&ROOT_INO) {
if let Some(e) = st.entries.get_mut(&root_ino) {
e.node = root.clone();
}
}