mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
ospp project (feature) add namespace overlayfs cgroup (#949)
## 开发进展: ## namespace - pid_namespace 基本实现,基于pid_struct等数据结构实现隔离 - mnt_namespace 基本实现,挂载点的隔离通过不同的挂载树来实现 - usernamespace 作为支持性的namespace,目前受限实现全局静态 ## overlayfs - 实现若干个文件系统的叠加,在mount中传入多个路径作为多个fs的mount路径以及最后merge层的fs路径 - copy-up机制的,除最上层外其他层为只读层,满足写时拷贝,需要修改的时候copy到上层修改 - whiteout特殊文件,用于标记在下层需要被删除的文件用来掩盖需要删除的文件 ## cgroups - 目前cgroups还处于框架阶段,之后具体实现具体的内存、CPU等子系统
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
use core::{
|
||||
ffi::{c_int, c_void},
|
||||
ptr::null,
|
||||
sync::atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
|
||||
@ -1090,7 +1089,9 @@ impl Syscall {
|
||||
let source = args[0] as *const u8;
|
||||
let target = args[1] as *const u8;
|
||||
let filesystemtype = args[2] as *const u8;
|
||||
return Self::mount(source, target, filesystemtype, 0, null());
|
||||
let mountflags = args[3];
|
||||
let data = args[4] as *const u8; // 额外的mount参数,实现自己的mountdata来获取
|
||||
return Self::mount(source, target, filesystemtype, mountflags, data);
|
||||
}
|
||||
|
||||
SYS_UMOUNT2 => {
|
||||
@ -1183,6 +1184,7 @@ impl Syscall {
|
||||
let flags = args[1] as u32;
|
||||
Self::sys_eventfd(initval, flags)
|
||||
}
|
||||
SYS_UNSHARE => Self::sys_unshare(args[0] as u64),
|
||||
SYS_BPF => {
|
||||
let cmd = args[0] as u32;
|
||||
let attr = args[1] as *mut u8;
|
||||
|
Reference in New Issue
Block a user