|
The Pedigree Project 0.1
|
#include <ProcFs.h>
Inheritance diagram for ProcFs:
Collaboration diagram for ProcFs:Public Member Functions | |
| SyncStatus | sync () override |
| ProcFs (const SharedPointer< UserspacePidNamespace > &space=Process::rootPidNamespace()) | |
| const SharedPointer< UserspacePidNamespace > & | pidNamespace () const |
| virtual bool | initialise (Disk *pDisk) |
| virtual File * | getRoot () const |
| virtual const String & | getVolumeLabel () const |
| virtual size_t | getNextInode () |
| virtual void | revertInode () |
| void | addProcess (PosixProcess *proc) |
| void | removeProcess (PosixProcess *proc) |
| void | invalidateNamespaceTask (const SharedPointer< PosixNamespaceContext > &context, size_t pid, size_t taskId) |
Public Member Functions inherited from Filesystem | |
| Filesystem () | |
| virtual | ~Filesystem () |
| virtual File * | find (const StringView &path) |
| virtual File * | find (const String &path) |
| virtual File * | find (const StringView &path, File *pStartNode) |
| virtual File * | find (const String &path, File *pStartNode) |
| File * | findRetained (const StringView &path, Directory::ChildLease &result, File *pStartNode=nullptr) |
| virtual bool | getUuid (String &uuid) const |
| virtual FileHandleStatus | encodeFileHandle (File &file, FileHandle &handle) |
| virtual FileHandleStatus | decodeFileHandle (const FileHandle &handle, RetainedFile &file) |
| virtual FileHandleStatus | fileHandleFsid (FileSystemId &id) |
| virtual SyncStatus | shutdown () |
| virtual bool | deviceRemoved (bool deviceAvailable=false) |
| bool | tryAcquireOperation (OperationBarrier::Lease &operation) const |
| bool | isDeviceRemoved () const |
| virtual QuotaStatus | quotaControl (const QuotaRequest &, QuotaResponse &, File *quotaFile=nullptr) |
| bool | createFile (const StringView &path, uint32_t mask, File *pStartNode=0) |
| bool | createDirectory (const StringView &path, uint32_t mask, File *pStartNode=0) |
| bool | createSymlink (const StringView &path, const String &value, File *pStartNode=0) |
| bool | createLink (const StringView &path, File *target, File *pStartNode=0) |
| bool | remove (const StringView &path, File *pStartNode=0) |
| bool | remove (const StringView &path, File *pStartNode, File *expected) |
| bool | rename (const StringView &oldPath, File *oldStart, const StringView &newPath, File *newStart, bool noReplace=false) |
| Disk * | getDisk () |
| bool | isReadOnly () |
| virtual bool | isCaseSensitive () |
| bool | remove (File *parent, File *file) |
Static Public Member Functions | |
| static void | publishProcess (PosixProcess *process) |
| static void | unpublishProcess (PosixProcess *process) |
Protected Member Functions | |
| virtual bool | createFile (File *parent, const String &filename, uint32_t mask) |
| virtual bool | createDirectory (File *parent, const String &filename, uint32_t mask) |
| virtual bool | createSymlink (File *parent, const String &filename, const String &value) |
| virtual bool | removeNode (File *, const String &, File *) |
Protected Member Functions inherited from Filesystem | |
| virtual bool | createLink (File *parent, const String &filename, File *target) |
| virtual bool | renameNode (Directory *oldParent, const String &oldName, File *source, Directory *newParent, const String &newName, File *replaced) |
| bool | beginDeviceRemoval (bool deviceAvailable) |
Private Member Functions | |
| ProcFs (const ProcFs &) | |
| ProcFs & | operator= (const ProcFs &) |
| bool | initialiseNamespaceLinks () |
| void | initialiseResolverFile () |
| void | initialiseNetworkFile () |
| ProcFsDirectory * | createProcessDirectory (PosixProcess *process) |
Private Attributes | |
| SharedPointer< UserspacePidNamespace > | m_PidNamespace |
| ProcFs * | m_RegistryNext = nullptr |
| bool | m_Registered = false |
| ProcFsDirectory * | m_pRoot |
| Atomic< size_t > | m_NextInode |
| String | m_PciDevices |
Additional Inherited Members | |
Public Types inherited from Filesystem | |
| enum class | SyncStatus { Success , Unsupported , NoMemory , IoError } |
| typedef Filesystem *(* | ProbeCallback) (Disk *) |
Protected Attributes inherited from Filesystem | |
| bool | m_bReadOnly |
| Disk * | m_pDisk |
| DiskUse | m_DiskUse |
| OperationBarrier | m_Operations |
|
inlineexplicit |
| void ProcFs::addProcess | ( | PosixProcess * | proc | ) |
Definition at line 533 of file ProcFs.cc.
References Dec, SharedPointer< T >::get(), Process::getGroup(), Group::getId(), User::getId(), Process::getUser(), Process::getUserspaceId(), and Directory::lookupChild().
Referenced by initialise().
Here is the caller graph for this function:
|
inlineprotectedvirtual |
createDirectory calls this after it has parsed the string path.
Implements Filesystem.
|
inlineprotectedvirtual |
createFile calls this after it has parsed the string path.
Implements Filesystem.
|
private |
Definition at line 396 of file ProcFs-namespaces.cc.
|
inlineprotectedvirtual |
createSymlink calls this after it has parsed the string path.
Implements Filesystem.
|
inlinevirtual |
|
inlinevirtual |
Returns a string identifying the volume label.
Implements Filesystem.
|
virtual |
Populates this filesystem with data from the given Disk device.
Implements Filesystem.
Definition at line 341 of file ProcFs.cc.
References addProcess(), VFS::find(), Device::foreach(), Directory::fromFile(), Process::getId(), File::getName(), VFS::instance(), and Scheduler::instance().
|
private |
Definition at line 383 of file ProcFs-namespaces.cc.
|
private |
Definition at line 220 of file ProcFs-network.cc.
|
private |
Definition at line 85 of file ProcFs-resolver.cc.
| void ProcFs::invalidateNamespaceTask | ( | const SharedPointer< PosixNamespaceContext > & | context, |
| size_t | pid, | ||
| size_t | taskId | ||
| ) |
Definition at line 413 of file ProcFs-namespaces.cc.
|
inline |
|
static |
|
inlineprotectedvirtual |
Remove a backing node while the VFS holds the parent's namespace lock. A successful implementation must retire the parent's cached entry before returning and must recheck directory emptiness while holding the child's namespace lock.
Implements Filesystem.
| void ProcFs::removeProcess | ( | PosixProcess * | proc | ) |
|
inlineoverridevirtual |
Completes data, metadata and device writeback for changes made before entry.
Reimplemented from Filesystem.
|
static |
|
private |
|
private |