OQueue panics in the following scenario:
- During the boot, there weren't enough
BioCompletionStat entries in the BioCompletionOQueue.
- However, the LinnOS policy always attempts to peak four elements in the
BioCompletionOQueue.
- While there are fewer than four elements in
BioCompletionOQueue, the Cursor with usize as its type has self.0 - rhs less than 0, which causes panic immediately.
pub struct Cursor(usize);
impl Sub<usize> for Cursor {
type Output = Cursor;
fn sub(self, rhs: usize) -> Self::Output {
Cursor(self.0 - rhs)
}
}
#228 is a temporary solution to bypass the panic. But the first few OQueue reads might not return reliable values.
@arthurp Any thoughts?
OQueue panics in the following scenario:
BioCompletionStatentries in theBioCompletionOQueue.BioCompletionOQueue.BioCompletionOQueue, theCursorwithusizeas its type hasself.0 - rhsless than 0, which causes panic immediately.#228 is a temporary solution to bypass the panic. But the first few OQueue reads might not return reliable values.
@arthurp Any thoughts?