mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Limit the number of segments in single bio request
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
a883b65187
commit
c6aa9f9ee8
@ -212,6 +212,9 @@ impl From<aster_block::bio::BioEnqueueError> for Error {
|
||||
aster_block::bio::BioEnqueueError::Refused => {
|
||||
Error::with_message(Errno::EBUSY, "Refuse to enqueue the bio")
|
||||
}
|
||||
aster_block::bio::BioEnqueueError::TooBig => {
|
||||
Error::with_message(Errno::EINVAL, "Bio is too big")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,10 @@ mod test {
|
||||
bio.complete(BioStatus::Complete);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn max_nr_segments_per_bio(&self) -> usize {
|
||||
usize::MAX
|
||||
}
|
||||
}
|
||||
/// Exfat disk image
|
||||
static EXFAT_IMAGE: &[u8] = include_bytes!("../../../../../regression/build/exfat.img");
|
||||
|
Reference in New Issue
Block a user