Home
last modified time | relevance | path

Searched refs:IndexNode (Results 1 – 25 of 43) sorted by relevance

12

/DragonOS/docs/kernel/filesystem/vfs/
H A Ddesign.md49 - IndexNode: 表明某个struct是一个索引节点
51 …sp;一般情况下,FileSystem和IndexNode是一对一的关系,也就是,一个文件系统对应一种IndexNode。但是,对于某些特殊的文件系统,比如DevFS,根据不同的设备类型,会有不同…
55   挂载文件系统虽然实现了FileSystem和IndexNode这两个trait,但它并不是一个“文件系统”,而是一种机制,用于将不同的文件系统挂载到同一个文件系统树上.
H A Dindex.rst13 - 提供IndexNode抽象
/DragonOS/kernel/src/filesystem/vfs/
H A Dmod.rs127 pub trait IndexNode: Any + Sync + Send + Debug + CastFromSync { interface
238 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() argument
258 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
270 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
303 _target: &Arc<dyn IndexNode>, in move_to() argument
316 fn find(&self, _name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
429 fn mount_from(&self, _des: Arc<dyn IndexNode>) -> Result<Arc<MountFS>, SystemError> { in mount_from()
500 ) -> Result<Arc<dyn IndexNode>, SystemError> { in mknod() argument
519 fn mkdir(&self, name: &str, mode: ModeType) -> Result<Arc<dyn IndexNode>, SystemError> { in mkdir() argument
565 fn parent(&self) -> Result<Arc<dyn IndexNode>, SystemError> { in parent() argument
[all …]
H A Dmount.rs30 FilePrivateData, FileSystem, FileType, IndexNode, InodeId, Magic, SuperBlock,
51 #[cast_to([sync] IndexNode)]
54 inner_inode: Arc<dyn IndexNode>,
245 impl IndexNode for MountFSInode {
264 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
330 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() argument
339 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
374 target: &Arc<dyn IndexNode>, in move_to() argument
380 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
386 .map(|inode| inode as Arc<dyn IndexNode>) in find()
[all …]
H A Dcore.rs30 FilePrivateData, IndexNode, InodeId, VFS_MAX_FOLLOW_SYMLINK_TIMES,
47 static mut __ROOT_INODE: Option<Arc<dyn IndexNode>> = None;
52 pub fn ROOT_INODE() -> Arc<dyn IndexNode> { in ROOT_INODE()
173 ) -> Result<Arc<dyn IndexNode>, SystemError> { in do_mkdir_at() argument
200 let parent_inode: Arc<dyn IndexNode> = inode_begin in do_remove_dir()
225 let inode: Result<Arc<dyn IndexNode>, SystemError> = in do_unlink_at()
242 let parent_inode: Arc<dyn IndexNode> = inode_begin in do_unlink_at()
H A Dfile.rs12 use super::{Dirent, FileType, IndexNode, InodeId, Metadata, SpecialNodeData};
130 inode: Lazy<Weak<dyn IndexNode>>,
150 pub fn new(inode: Option<Weak<dyn IndexNode>>) -> Arc<PageCache> { in new()
154 let v: Lazy<Weak<dyn IndexNode>> = Lazy::new(); in new()
164 pub fn inode(&self) -> Option<Weak<dyn IndexNode>> { in inode() argument
187 pub fn set_inode(&self, inode: Weak<dyn IndexNode>) -> Result<(), SystemError> { in set_inode()
199 inode: Arc<dyn IndexNode>,
218 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, SystemError> { in new() argument
441 let inode: &Arc<dyn IndexNode> = &self.inode; in readdir()
458 let sub_inode: Arc<dyn IndexNode> = match inode.find(name) { in readdir()
[all …]
H A Dopen.rs10 FileType, IndexNode, MAX_PATHLEN, ROOT_INODE, VFS_MAX_FOLLOW_SYMLINK_TIMES,
105 fn chown_common(inode: Arc<dyn IndexNode>, uid: usize, gid: usize) -> Result<usize, SystemError> { in chown_common() argument
173 let inode: Result<Arc<dyn IndexNode>, SystemError> = inode_begin.lookup_follow_symlink( in do_sys_openat2()
182 let inode: Arc<dyn IndexNode> = match inode { in do_sys_openat2()
192 let parent_inode: Arc<dyn IndexNode> = in do_sys_openat2()
195 let inode: Arc<dyn IndexNode> = parent_inode.create( in do_sys_openat2()
H A Dutils.rs10 use super::{fcntl::AtFlags, FileType, IndexNode, ROOT_INODE};
44 ) -> Result<(Arc<dyn IndexNode>, String), SystemError> { in user_path_at() argument
/DragonOS/kernel/src/filesystem/overlayfs/
H A Dmod.rs6 use super::vfs::{self, FileSystem, FileType, FsInfo, IndexNode, Metadata, SuperBlock};
97 upper_inode: SpinLock<Option<Arc<dyn IndexNode>>>, // 读写层
98 lower_inode: Option<Arc<dyn IndexNode>>, // 只读层
105 upper: Option<Arc<dyn IndexNode>>, in new() argument
106 lower_inode: Option<Arc<dyn IndexNode>>, in new() argument
121 fn root_inode(&self) -> Arc<dyn IndexNode> { in root_inode() argument
146 pub fn ovl_upper_mnt(&self) -> Arc<dyn IndexNode> { in ovl_upper_mnt() argument
255 impl IndexNode for OvlInode {
333 ) -> Result<Arc<dyn IndexNode>, system_error::SystemError> { in mkdir() argument
378 other: &Arc<dyn IndexNode>, in link() argument
[all …]
H A Dentry.rs5 use crate::filesystem::vfs::IndexNode;
25 inode: Arc<dyn IndexNode>,
H A Dcopy_up.rs3 filesystem::vfs::{IndexNode, Metadata},
32 fn create_upper_inode(&self, metadata: Metadata) -> Result<Arc<dyn IndexNode>, SystemError> { in create_upper_inode() argument
/DragonOS/kernel/src/cgroup/
H A Dmod.rs8 use crate::filesystem::vfs::IndexNode;
31 kernfs_node: Box<dyn IndexNode>,
/DragonOS/kernel/src/namespaces/
H A Dmnt_namespace.rs19 use crate::filesystem::vfs::IndexNode;
67 pub root: Arc<dyn IndexNode>,
68 pub pwd: Arc<dyn IndexNode>,
84 pub fn set_root(&mut self, inode: Arc<dyn IndexNode>) { in set_root() argument
87 pub fn set_pwd(&mut self, inode: Arc<dyn IndexNode>) { in set_pwd() argument
/DragonOS/kernel/src/filesystem/devpts/
H A Dmod.rs32 core::generate_inode_id, FilePrivateData, FileSystem, FsInfo, IndexNode, Metadata,
68 fn root_inode(&self) -> Arc<dyn IndexNode> { in root_inode() argument
145 impl IndexNode for LockedDevPtsFSInode {
222 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
258 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
262 Ok(dev.clone() as Arc<dyn IndexNode>) in find()
/DragonOS/kernel/src/filesystem/devfs/
H A Dmod.rs10 FilePrivateData, FileSystem, FileType, FsInfo, IndexNode, Magic, Metadata, SuperBlock,
44 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument
249 children: BTreeMap<DName, Arc<dyn IndexNode>>,
319 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_dev()
349 ) -> Result<Arc<dyn IndexNode>, SystemError> { in do_create_with_data() argument
393 impl IndexNode for LockedDevFSInode {
416 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
423 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
559 fn parent(&self) -> Result<Arc<dyn IndexNode>, SystemError> { in parent() argument
573 pub trait DeviceINode: IndexNode {
[all …]
H A Dnull_dev.rs5 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata,
70 impl IndexNode for LockedNullInode {
H A Dzero_dev.rs5 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata,
70 impl IndexNode for LockedZeroInode {
/DragonOS/docs/kernel/filesystem/
H A Dsysfs.md39 sys_info: Option<Arc<dyn IndexNode>>, // sys information
57 sys_info: Option<Arc<dyn IndexNode>>, // sys information
77 sys_info: Option<Arc<dyn IndexNode>>, // 总线inode
H A Doverview.md80 - 提供IndexNode抽象
/DragonOS/kernel/src/filesystem/ramfs/
H A Dmod.rs26 IndexNode, InodeId, Metadata, SpecialNodeData,
103 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument
172 impl IndexNode for LockedRamFSInode {
307 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
356 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
434 target: &Arc<dyn IndexNode>, in move_to() argument
466 target.link(new_name.as_ref(), &(inode_to_move as Arc<dyn IndexNode>))?; in move_to()
478 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
569 ) -> Result<Arc<dyn IndexNode>, SystemError> { in mknod() argument
637 fn parent(&self) -> Result<Arc<dyn IndexNode>, SystemError> { in parent() argument
[all …]
/DragonOS/kernel/src/filesystem/procfs/
H A Dmod.rs35 FileSystem, FsInfo, IndexNode, InodeId, Magic, Metadata, SuperBlock,
293 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument
405 let inode: Arc<dyn IndexNode> = self.root_inode(); in register_pid()
407 let pid_dir: Arc<dyn IndexNode> = inode.create( in register_pid()
414 let binding: Arc<dyn IndexNode> = pid_dir.create( in register_pid()
435 let proc: Arc<dyn IndexNode> = self.root_inode(); in unregister_pid()
437 let pid_dir: Arc<dyn IndexNode> = proc.find(&pid.to_string())?; in unregister_pid()
451 impl IndexNode for LockedProcFSInode {
598 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
651 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
[all …]
/DragonOS/kernel/src/bpf/prog/
H A Dmod.rs10 use crate::filesystem::vfs::{FilePrivateData, FileSystem, FileType, IndexNode, Metadata};
47 impl IndexNode for BpfProg {
/DragonOS/kernel/src/filesystem/kernfs/
H A Dmod.rs26 FileType, FsInfo, IndexNode, InodeId, Magic, Metadata, SuperBlock,
48 fn root_inode(&self) -> Arc<dyn IndexNode> { in root_inode() argument
153 impl IndexNode for KernFSInode {
195 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
200 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
218 _target: &Arc<dyn IndexNode>, in move_to() argument
225 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
/DragonOS/kernel/src/perf/
H A Dmod.rs8 FilePrivateData, FileSystem, FileType, FsInfo, IndexNode, Metadata, SuperBlock,
39 pub trait PerfEventOps: Send + Sync + Debug + CastFromSync + CastFrom + IndexNode {
106 impl IndexNode for PerfEventInode {
211 fn root_inode(&self) -> Arc<dyn IndexNode> { in root_inode() argument
H A Dkprobe.rs9 use crate::filesystem::vfs::{FilePrivateData, FileSystem, IndexNode};
85 impl IndexNode for KprobePerfEvent {

12