|
The Pedigree Project 0.1
|
#include <MountView.h>
Collaboration diagram for VfsMountView:Classes | |
| struct | MountSnapshot |
| struct | ResolveOptions |
| struct | State |
| class | WriteLease |
Public Types | |
| enum | MountFlags : uint64_t { ReadOnly = 1 , NoSuid = 2 , NoDev = 4 , NoExec = 8 } |
| enum class | BackingOwnership { External , Attachment } |
Public Member Functions | |
| VfsMountView (VFS &vfs) | |
| bool | initialise (Filesystem *bootRoot) |
| bool | createBootContext (FilesystemContextOwner &result) |
| bool | forkNamespace (const FilesystemContextRef &context, FilesystemContextOwner &result, uint64_t ownerNamespace=0) |
| uint64_t | ownerNamespace () const |
| bool | resolve (const FilesystemContextRef &context, const FilesystemPathRef &start, const String &path, const ResolveOptions &options, FilesystemPathRef &result) |
| bool | follow (const FilesystemContextRef &context, const FilesystemPathRef &selected, FilesystemPathRef &result) |
| bool | resolveParent (const FilesystemContextRef &context, const FilesystemPathRef &start, const String &path, FilesystemPathRef &parent, String &basename) |
| bool | changeCwd (const FilesystemContextRef &context, const FilesystemPathRef &path) |
| bool | changeRoot (const FilesystemContextRef &context, const FilesystemPathRef &path) |
| bool | formatPath (const FilesystemContextSnapshot &context, const FilesystemPathRef &path, String &result) |
| bool | snapshotMounts (const FilesystemContextRef &context, Vector< MountSnapshot > &result) |
| bool | attach (const FilesystemContextRef &context, const FilesystemPathRef &covered, Filesystem *backing, BackingOwnership ownership=BackingOwnership::External, uint64_t flags=0) |
| bool | bind (const FilesystemContextRef &context, const FilesystemPathRef &source, const FilesystemPathRef &target, bool recursive) |
| bool | remount (const FilesystemContextRef &context, const FilesystemPathRef &target, uint64_t flags, bool recursive=false) |
| uint64_t | mountFlags (const FilesystemPathRef &path) const |
| bool | writable (const FilesystemPathRef &path) const |
| bool | detach (const FilesystemContextRef &context, const String &target, bool lazy) |
| bool | detachBackingForShutdown (Filesystem *backing) |
| bool | detachBackingForRemoval (Filesystem *backing) |
| bool | shutdown (Vector< Filesystem * > &ownedBackings) |
| bool | pivot (const FilesystemContextRef &context, const String &newRoot, const String &putOld) |
| uint64_t | attachmentId (const FilesystemPathRef &path) const |
| bool | isMountpoint (File *node) const |
| bool | createFile (const FilesystemPathRef &parent, const String &name, uint32_t mask) |
| bool | createDirectory (const FilesystemPathRef &parent, const String &name, uint32_t mask) |
| bool | createSymlink (const FilesystemPathRef &parent, const String &name, const String &value) |
| bool | createLink (const FilesystemPathRef &parent, const String &name, const FilesystemPathRef &target) |
| bool | remove (const FilesystemPathRef &parent, const String &name, File *expected=nullptr) |
| bool | rename (const FilesystemPathRef &oldParent, const String &oldName, const FilesystemPathRef &newParent, const String &newName, bool noReplace, bool sourceMustBeDirectory=false) |
| bool | anonymousPath (File *retainedNode, FilesystemPathRef &result) |
| bool | pathForNode (const FilesystemPathRef &sameAttachment, File *retainedNode, FilesystemPathRef &result) |
| bool | samePath (const FilesystemPathRef &first, const FilesystemPathRef &second) const |
| uint64_t | filesystemAccess (const FilesystemPathRef &path, const VFS::NamespaceMutation *writer=nullptr) |
| bool | checkFilesystemAccess (const FilesystemPathRef &path, uint64_t access, const VFS::NamespaceMutation *writer=nullptr) |
| bool | authorizeRemove (const FilesystemPathRef &parent, File *node, const VFS::NamespaceMutation &writer) |
| bool | authorizeLink (const FilesystemPathRef &parent, const FilesystemPathRef &target, const VFS::NamespaceMutation &writer) |
| bool | authorizeRename (const FilesystemPathRef &oldParent, File *source, const FilesystemPathRef &newParent, File *replaced, const VFS::NamespaceMutation &writer, bool removeSource=true) |
| Directory::AddStatus | createEphemeral (const FilesystemPathRef &parent, File *node, uint64_t access) |
| bool | bootRootPath (FilesystemPathRef &result) |
Static Public Member Functions | |
| static bool | retainWrite (const FilesystemPathRef &path, SharedPointer< FilesystemWriteLease > &result) |
| static VfsMountView * | fromContext (const FilesystemContextRef &context) |
| static VfsMountView * | fromPath (const FilesystemPathRef &path) |
Static Public Attributes | |
| static constexpr uint64_t | SupportedMountFlags = ReadOnly | NoSuid | NoDev | NoExec |
Private Member Functions | |
| void | retain () |
| void | release () |
| VfsMountView (const VfsMountView &)=delete | |
| VfsMountView & | operator= (const VfsMountView &)=delete |
Private Attributes | |
| State * | m_State |
| VFS & | m_Vfs |
| size_t | m_References = 1 |
| bool | m_Automatic = false |
| uint64_t | m_OwnerNamespace = 0 |
Friends | |
| class | VfsPath |
| class | VfsFilesystemContext |
One mount namespace. Filesystem registration and storage retirement stay in VFS.
Definition at line 17 of file MountView.h.
|
strong |
Definition at line 71 of file MountView.h.
| enum VfsMountView::MountFlags : uint64_t |
Definition at line 32 of file MountView.h.
|
explicit |
Definition at line 114 of file MountView.cc.
| VfsMountView::~VfsMountView | ( | ) |
Definition at line 129 of file MountView.cc.
| bool VfsMountView::anonymousPath | ( | File * | retainedNode, |
| FilesystemPathRef & | result | ||
| ) |
Definition at line 574 of file MountView.cc.
| bool VfsMountView::attach | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | covered, | ||
| Filesystem * | backing, | ||
| BackingOwnership | ownership = BackingOwnership::External, |
||
| uint64_t | flags = 0 |
||
| ) |
Definition at line 324 of file MountView-mounts.cc.
| uint64_t VfsMountView::attachmentId | ( | const FilesystemPathRef & | path | ) | const |
Definition at line 564 of file MountView.cc.
| bool VfsMountView::authorizeLink | ( | const FilesystemPathRef & | parent, |
| const FilesystemPathRef & | target, | ||
| const VFS::NamespaceMutation & | writer | ||
| ) |
Definition at line 158 of file MountView-access.cc.
| bool VfsMountView::authorizeRemove | ( | const FilesystemPathRef & | parent, |
| File * | node, | ||
| const VFS::NamespaceMutation & | writer | ||
| ) |
Definition at line 151 of file MountView-access.cc.
| bool VfsMountView::authorizeRename | ( | const FilesystemPathRef & | oldParent, |
| File * | source, | ||
| const FilesystemPathRef & | newParent, | ||
| File * | replaced, | ||
| const VFS::NamespaceMutation & | writer, | ||
| bool | removeSource = true |
||
| ) |
Definition at line 179 of file MountView-access.cc.
| bool VfsMountView::bind | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | source, | ||
| const FilesystemPathRef & | target, | ||
| bool | recursive | ||
| ) |
Definition at line 6 of file MountView-mounts.cc.
| bool VfsMountView::bootRootPath | ( | FilesystemPathRef & | result | ) |
Definition at line 400 of file MountView.cc.
| bool VfsMountView::changeCwd | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | path | ||
| ) |
Definition at line 519 of file MountView.cc.
| bool VfsMountView::changeRoot | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | path | ||
| ) |
Definition at line 542 of file MountView.cc.
| bool VfsMountView::checkFilesystemAccess | ( | const FilesystemPathRef & | path, |
| uint64_t | access, | ||
| const VFS::NamespaceMutation * | writer = nullptr |
||
| ) |
Definition at line 126 of file MountView-access.cc.
| bool VfsMountView::createBootContext | ( | FilesystemContextOwner & | result | ) |
Definition at line 413 of file MountView.cc.
| bool VfsMountView::createDirectory | ( | const FilesystemPathRef & | parent, |
| const String & | name, | ||
| uint32_t | mask | ||
| ) |
Definition at line 65 of file MountView-entries.cc.
| Directory::AddStatus VfsMountView::createEphemeral | ( | const FilesystemPathRef & | parent, |
| File * | node, | ||
| uint64_t | access | ||
| ) |
Definition at line 145 of file MountView-entries.cc.
| bool VfsMountView::createFile | ( | const FilesystemPathRef & | parent, |
| const String & | name, | ||
| uint32_t | mask | ||
| ) |
Definition at line 54 of file MountView-entries.cc.
| bool VfsMountView::createLink | ( | const FilesystemPathRef & | parent, |
| const String & | name, | ||
| const FilesystemPathRef & | target | ||
| ) |
Definition at line 89 of file MountView-entries.cc.
| bool VfsMountView::createSymlink | ( | const FilesystemPathRef & | parent, |
| const String & | name, | ||
| const String & | value | ||
| ) |
Definition at line 77 of file MountView-entries.cc.
| bool VfsMountView::detach | ( | const FilesystemContextRef & | context, |
| const String & | target, | ||
| bool | lazy | ||
| ) |
Definition at line 436 of file MountView-mounts.cc.
| bool VfsMountView::detachBackingForRemoval | ( | Filesystem * | backing | ) |
Definition at line 646 of file MountView-mounts.cc.
| bool VfsMountView::detachBackingForShutdown | ( | Filesystem * | backing | ) |
Definition at line 601 of file MountView-mounts.cc.
| uint64_t VfsMountView::filesystemAccess | ( | const FilesystemPathRef & | path, |
| const VFS::NamespaceMutation * | writer = nullptr |
||
| ) |
Definition at line 94 of file MountView-access.cc.
| bool VfsMountView::follow | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | selected, | ||
| FilesystemPathRef & | result | ||
| ) |
Definition at line 389 of file MountView-path.cc.
| bool VfsMountView::forkNamespace | ( | const FilesystemContextRef & | context, |
| FilesystemContextOwner & | result, | ||
| uint64_t | ownerNamespace = 0 |
||
| ) |
Definition at line 240 of file MountView.cc.
| bool VfsMountView::formatPath | ( | const FilesystemContextSnapshot & | context, |
| const FilesystemPathRef & | path, | ||
| String & | result | ||
| ) |
Definition at line 66 of file MountView-report.cc.
|
static |
Definition at line 123 of file MountView.cc.
|
static |
Definition at line 126 of file MountView.cc.
| bool VfsMountView::initialise | ( | Filesystem * | bootRoot | ) |
Definition at line 353 of file MountView.cc.
| bool VfsMountView::isMountpoint | ( | File * | node | ) | const |
Definition at line 44 of file MountView-entries.cc.
| uint64_t VfsMountView::mountFlags | ( | const FilesystemPathRef & | path | ) | const |
Definition at line 135 of file MountView-mounts.cc.
|
inline |
Definition at line 56 of file MountView.h.
| bool VfsMountView::pathForNode | ( | const FilesystemPathRef & | sameAttachment, |
| File * | retainedNode, | ||
| FilesystemPathRef & | result | ||
| ) |
Definition at line 588 of file MountView.cc.
| bool VfsMountView::pivot | ( | const FilesystemContextRef & | context, |
| const String & | newRoot, | ||
| const String & | putOld | ||
| ) |
Definition at line 490 of file MountView-mounts.cc.
|
private |
Definition at line 118 of file MountView.cc.
| bool VfsMountView::remount | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | target, | ||
| uint64_t | flags, | ||
| bool | recursive = false |
||
| ) |
Definition at line 198 of file MountView-mounts.cc.
| bool VfsMountView::remove | ( | const FilesystemPathRef & | parent, |
| const String & | name, | ||
| File * | expected = nullptr |
||
| ) |
Definition at line 119 of file MountView-entries.cc.
| bool VfsMountView::rename | ( | const FilesystemPathRef & | oldParent, |
| const String & | oldName, | ||
| const FilesystemPathRef & | newParent, | ||
| const String & | newName, | ||
| bool | noReplace, | ||
| bool | sourceMustBeDirectory = false |
||
| ) |
Definition at line 127 of file MountView-entries.cc.
| bool VfsMountView::resolve | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | start, | ||
| const String & | path, | ||
| const ResolveOptions & | options, | ||
| FilesystemPathRef & | result | ||
| ) |
Definition at line 352 of file MountView-path.cc.
| bool VfsMountView::resolveParent | ( | const FilesystemContextRef & | context, |
| const FilesystemPathRef & | start, | ||
| const String & | path, | ||
| FilesystemPathRef & | parent, | ||
| String & | basename | ||
| ) |
Definition at line 433 of file MountView-path.cc.
|
private |
Definition at line 115 of file MountView.cc.
|
static |
Definition at line 171 of file MountView-mounts.cc.
| bool VfsMountView::samePath | ( | const FilesystemPathRef & | first, |
| const FilesystemPathRef & | second | ||
| ) | const |
Definition at line 568 of file MountView.cc.
| bool VfsMountView::shutdown | ( | Vector< Filesystem * > & | ownedBackings | ) |
Definition at line 670 of file MountView-mounts.cc.
| bool VfsMountView::snapshotMounts | ( | const FilesystemContextRef & | context, |
| Vector< MountSnapshot > & | result | ||
| ) |
Definition at line 81 of file MountView-report.cc.
| bool VfsMountView::writable | ( | const FilesystemPathRef & | path | ) | const |
Definition at line 185 of file MountView-mounts.cc.
|
friend |
Definition at line 125 of file MountView.h.
|
friend |
Definition at line 124 of file MountView.h.
|
private |
Definition at line 130 of file MountView.h.
|
private |
Definition at line 131 of file MountView.h.
|
private |
Definition at line 129 of file MountView.h.
|
private |
Definition at line 127 of file MountView.h.
|
private |
Definition at line 128 of file MountView.h.
|
staticconstexpr |
Definition at line 33 of file MountView.h.