Refactor the source structure in aster_frame::mm

This commit is contained in:
Zhang Junyang
2024-06-02 11:00:34 +00:00
committed by Tate, Hongliang Tian
parent e8595b95fe
commit 7095b37e7e
38 changed files with 177 additions and 129 deletions

View File

@ -21,7 +21,7 @@ mod test {
bio::{BioEnqueueError, BioStatus, BioType, SubmittedBio},
BlockDevice,
};
use aster_frame::mm::{Segment, VmAllocOptions, VmIo};
use aster_frame::mm::{FrameAllocOptions, Segment, VmIo};
use rand::{rngs::SmallRng, RngCore, SeedableRng};
use crate::{
@ -102,7 +102,7 @@ mod test {
/// Read exfat disk image
fn new_vm_segment_from_image() -> Segment {
let vm_segment = {
VmAllocOptions::new(EXFAT_IMAGE.len() / PAGE_SIZE)
FrameAllocOptions::new(EXFAT_IMAGE.len() / PAGE_SIZE)
.is_contiguous(true)
.uninit(true)
.alloc_contiguous()