pub struct FileSystemManager {
pub root: Arc<Mutex<RamInode>>,
pub ramfs: Arc<RamFS>,
pub mounts: Vec<MountPoint>,
}Expand description
文件系统管理器
管理全局文件系统实例和挂载表
Fields§
§root: Arc<Mutex<RamInode>>根目录 (RamFS)
ramfs: Arc<RamFS>RamFS实例
mounts: Vec<MountPoint>挂载表
Implementations§
Source§impl FileSystemManager
impl FileSystemManager
Sourcepub fn mount_blkfs(
&mut self,
path: &str,
dev: BlockDeviceHandle,
) -> Result<(), &'static str>
pub fn mount_blkfs( &mut self, path: &str, dev: BlockDeviceHandle, ) -> Result<(), &'static str>
Sourcepub fn mount_blkfs_with_options(
&mut self,
path: &str,
dev: BlockDeviceHandle,
options: BlkFsMountOptions,
) -> Result<(), &'static str>
pub fn mount_blkfs_with_options( &mut self, path: &str, dev: BlockDeviceHandle, options: BlkFsMountOptions, ) -> Result<(), &'static str>
按显式策略挂载一个 AhRightOS-native BlkFS。
OpenOnly 适合把 QEMU virtio-blk 镜像当作“真实磁盘镜像”挂载:
如果镜像不是 BlkFS,内核会清晰失败而不会误格式化。Format 必须由
调用者显式指定,用于实验中的重新格式化场景。
Sourcepub fn mount_virtualfs(
&mut self,
path: &str,
fs_type: FsType,
virtualfs: Arc<dyn VirtualFileSystem>,
) -> Result<(), &'static str>
pub fn mount_virtualfs( &mut self, path: &str, fs_type: FsType, virtualfs: Arc<dyn VirtualFileSystem>, ) -> Result<(), &'static str>
挂载一个虚拟文件系统(如 procfs/sysfs/devtmpfs)。
Auto Trait Implementations§
impl !RefUnwindSafe for FileSystemManager
impl !UnwindSafe for FileSystemManager
impl Freeze for FileSystemManager
impl Send for FileSystemManager
impl Sync for FileSystemManager
impl Unpin for FileSystemManager
impl UnsafeUnpin for FileSystemManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more