Lines Matching refs:Arc

10     sync::{Arc, Weak},
40 inner_filesystem: Arc<dyn FileSystem>,
42 mountpoints: SpinLock<BTreeMap<InodeId, Arc<MountFS>>>,
44 self_mountpoint: Option<Arc<MountFSInode>>,
54 inner_inode: Arc<dyn IndexNode>,
56 mount_fs: Arc<MountFS>,
63 inner_filesystem: Arc<dyn FileSystem>, in new()
64 self_mountpoint: Option<Arc<MountFSInode>>, in new()
65 ) -> Arc<Self> { in new()
66 return Arc::new_cyclic(|self_ref| MountFS { in new()
79 fn wrap(self) -> Arc<Self> { in wrap()
81 let mount_fs: Arc<MountFS> = Arc::new(self); in wrap()
83 let weak: Weak<MountFS> = Arc::downgrade(&mount_fs); in wrap()
95 pub fn mountpoint_root_inode(&self) -> Arc<MountFSInode> { in mountpoint_root_inode()
96 return Arc::new_cyclic(|self_ref| MountFSInode { in mountpoint_root_inode()
103 pub fn inner_filesystem(&self) -> Arc<dyn FileSystem> { in inner_filesystem()
107 pub fn self_ref(&self) -> Arc<Self> { in self_ref()
114 pub fn umount(&self) -> Result<Arc<MountFS>, SystemError> { in umount()
128 fn wrap(self) -> Arc<Self> { in wrap()
130 let inode: Arc<MountFSInode> = Arc::new(self); in wrap()
132 let weak: Weak<MountFSInode> = Arc::downgrade(&inode); in wrap()
157 fn overlaid_inode(&self) -> Arc<MountFSInode> { in overlaid_inode()
167 fn do_find(&self, name: &str) -> Result<Arc<MountFSInode>, SystemError> { in do_find()
171 return Ok(Arc::new_cyclic(|self_ref| MountFSInode { in do_find()
179 pub(super) fn do_parent(&self) -> Result<Arc<MountFSInode>, SystemError> { in do_parent()
185 return Ok(Arc::new_cyclic(|self_ref| MountFSInode { in do_parent()
198 return Ok(Arc::new_cyclic(|self_ref| MountFSInode { in do_parent()
207 fn do_umount(&self) -> Result<Arc<MountFS>, SystemError> { in do_umount()
264 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data()
268 return Ok(Arc::new_cyclic(|self_ref| MountFSInode { in create_with_data()
300 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
330 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create()
332 return Ok(Arc::new_cyclic(|self_ref| MountFSInode { in create()
339 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
374 target: &Arc<dyn IndexNode>, in move_to()
380 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find()
386 .map(|inode| inode as Arc<dyn IndexNode>) in find()
393 _ => self.do_find(name).map(|inode| inode as Arc<dyn IndexNode>), in find()
423 arg: Arc<dyn crate::net::event_poll::KernelIoctlData>, in kernel_ioctl()
434 fn mount(&self, fs: Arc<dyn FileSystem>) -> Result<Arc<MountFS>, SystemError> { in mount()
462 fn mount_from(&self, from: Arc<dyn IndexNode>) -> Result<Arc<MountFS>, SystemError> { in mount_from()
482 fn umount(&self) -> Result<Arc<MountFS>, SystemError> { in umount()
499 ) -> Result<Arc<dyn IndexNode>, SystemError> { in mknod()
501 return Ok(Arc::new_cyclic(|self_ref| MountFSInode { in mknod()
531 fn parent(&self) -> Result<Arc<dyn IndexNode>, SystemError> { in parent()
532 return self.do_parent().map(|inode| inode as Arc<dyn IndexNode>); in parent()
535 fn page_cache(&self) -> Option<Arc<PageCache>> { in page_cache()
541 fn root_inode(&self) -> Arc<dyn IndexNode> { in root_inode()
632 pub struct MountList(RwLock<BTreeMap<MountPath, Arc<MountFS>>>);
634 static mut __MOUNTS_LIST: Option<Arc<MountList>> = None;
650 __MOUNTS_LIST = Some(Arc::new(MountList(RwLock::new(BTreeMap::new())))); in init_mountlist()
662 pub fn MOUNT_LIST() -> &'static Arc<MountList> { in MOUNT_LIST()
684 pub fn insert<T: AsRef<str>>(&self, path: T, fs: Arc<MountFS>) { in insert()
706 ) -> Option<(String, String, Arc<MountFS>)> { in get_mount_point()
734 pub fn remove<T: Into<MountPath>>(&self, path: T) -> Option<Arc<MountFS>> { in remove()