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:
@@ -25,6 +25,8 @@ pub enum FsError {
|
||||
PathTooLong,
|
||||
/// Outside this connection's scope, or beyond its rights.
|
||||
Denied,
|
||||
/// Every connection storage has is in use.
|
||||
Full,
|
||||
/// The server refused, or the call itself failed.
|
||||
Failed,
|
||||
}
|
||||
@@ -64,7 +66,7 @@ impl Storage {
|
||||
syscall::Received::Signal { .. } => None,
|
||||
};
|
||||
let (true, Some(region)) = (tag == reply::ATTACHED, cap) else {
|
||||
return Err(FsError::Failed);
|
||||
return Err(if tag == reply::FULL { FsError::Full } else { FsError::Failed });
|
||||
};
|
||||
let mapped = crate::window::map_buffer(region, va).map_err(|_| FsError::Failed)?;
|
||||
let buf = mapped.get_mut(..size).ok_or(FsError::Failed)?;
|
||||
|
||||
@@ -16,6 +16,8 @@ pub enum SpawnError {
|
||||
NotFound,
|
||||
/// More than what is left of this process's spawn allowance.
|
||||
OverAllowance,
|
||||
/// Storage had no connection free to load it through.
|
||||
StorageBusy,
|
||||
Failed,
|
||||
}
|
||||
|
||||
@@ -44,6 +46,7 @@ pub fn spawn(init: CapSlot, binary: CapSlot, limits: Limits) -> Result<Spawned,
|
||||
}),
|
||||
(reply::NOT_FOUND, _) => Err(SpawnError::NotFound),
|
||||
(reply::OVER_ALLOWANCE, _) => Err(SpawnError::OverAllowance),
|
||||
(reply::STORAGE_BUSY, _) => Err(SpawnError::StorageBusy),
|
||||
_ => Err(SpawnError::Failed),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user