Compose selected State Anchor paths over prepared roots

This commit is contained in:
ms2k 2026-07-17 03:58:27 +09:00
commit 4dd2b150d2

View file

@ -988,6 +988,8 @@ pub struct StateAnchorOwnership {
pub work_path: Option<HostPath>,
pub merged_path: Option<HostPath>,
pub daemon: PersistedHostProcessOwnership,
pub user_namespace: Option<NamespaceIdentity>,
pub mount_namespace: Option<NamespaceIdentity>,
pub mount: Option<MountIdentity>,
}
@ -1102,6 +1104,8 @@ impl StateAnchorOwnership {
work_path: None,
merged_path: None,
daemon: PersistedHostProcessOwnership::unassigned(),
user_namespace: None,
mount_namespace: None,
mount: None,
}
}
@ -1112,6 +1116,8 @@ impl StateAnchorOwnership {
&& self.work_path.is_none()
&& self.merged_path.is_none()
&& self.daemon.is_unassigned()
&& self.user_namespace.is_none()
&& self.mount_namespace.is_none()
&& self.mount.is_none()
}
@ -1121,6 +1127,8 @@ impl StateAnchorOwnership {
&& self.work_path.is_some()
&& self.merged_path.is_some()
&& self.daemon.is_current_committed()
&& self.user_namespace.is_some()
&& self.mount_namespace.is_some()
&& self.mount.is_some()
}
@ -1133,6 +1141,8 @@ impl StateAnchorOwnership {
validate_option_progress(self.work_path.as_ref(), next.work_path.as_ref())?;
validate_option_progress(self.merged_path.as_ref(), next.merged_path.as_ref())?;
validate_process_progress(&self.daemon, &next.daemon)?;
validate_option_progress(self.user_namespace.as_ref(), next.user_namespace.as_ref())?;
validate_option_progress(self.mount_namespace.as_ref(), next.mount_namespace.as_ref())?;
validate_option_progress(self.mount.as_ref(), next.mount.as_ref())
}
}