1 use alloc::sync::Arc; 2 3 use alloc::vec::Vec; 4 5 use crate::filesystem::vfs::IndexNode; 6 7 use super::{OvlInode, OvlSuperBlock}; 8 #[derive(Debug)] 9 pub struct OvlEntry { 10 numlower: usize, // 下层数量 11 lowerstack: Vec<OvlPath>, 12 } 13 14 impl OvlEntry { new() -> Self15 pub fn new() -> Self { 16 Self { 17 numlower: 2, 18 lowerstack: Vec::new(), 19 } 20 } 21 } 22 #[derive(Debug)] 23 pub struct OvlPath { 24 layer: Arc<OvlLayer>, 25 inode: Arc<dyn IndexNode>, 26 } 27 #[derive(Debug)] 28 pub struct OvlLayer { 29 pub mnt: Arc<OvlInode>, // 挂载点 30 pub index: u32, // 0 是上层读写层,>0 是下层只读层 31 pub fsid: u32, // 文件系统标识符 32 } 33