fix: storage tables grow (handles, open files, encrypted opens, grants: Slots/Vec, no 8/16 caps; release follows all narrowed grants); storage says FULL, init spawn STORAGE_BUSY (was NOT_FOUND), pm BUSY; cap slots per process 64 -> 255

This commit is contained in:
2026-10-28 16:17:36 +01:00
parent 3b71f29f4c
commit 1f2134fcec
19 changed files with 208 additions and 128 deletions

View File

@@ -131,8 +131,13 @@ impl Launcher<'_> {
let Some(index) = self.spawner.children.iter().position(Option::is_none) else {
return refused(reply::ERROR);
};
let Ok(mut file) = libkos::fs::Storage::attach(binary, PROGRAM_BUF_VA) else {
return refused(reply::NOT_FOUND);
let mut file = match libkos::fs::Storage::attach(binary, PROGRAM_BUF_VA) {
Ok(f) => f,
Err(libkos::fs::FsError::Full) => {
crate::outln!("init: cannot spawn: storage has no connection free");
return refused(reply::STORAGE_BUSY);
}
Err(_) => return refused(reply::NOT_FOUND),
};
// The grant is the file: its path inside it is empty.
let found = file.open(b"").and_then(|h| file.close(h)).is_ok();