The Pedigree Project 0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
RawFs Class Reference

#include <RawFs.h>

+ Inheritance diagram for RawFs:
+ Collaboration diagram for RawFs:

Public Member Functions

virtual bool initialise (Disk *pDisk)
 
virtual File * getRoot () const
 
virtual SyncStatus sync ()
 
virtual SyncStatus shutdown ()
 
virtual const String & getVolumeLabel () const
 
virtual uint64_t read (File *pFile, uint64_t location, uint64_t size, uintptr_t buffer, bool canBlock)
 
virtual uint64_t write (File *pFile, uint64_t location, uint64_t size, uintptr_t buffer, bool canBlock)
 
virtual void truncate (File *pFile)
 
virtual void fileAttributeChanged (File *pFile)
 
virtual void cacheDirectoryContents (File *pFile)
 
- 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 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 Filesystem * probe (Disk *pDisk)
 

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

 RawFs (const RawFs &)
 
RawFs & operator= (const RawFs &)
 

Private Attributes

class RawFsDir * m_pRoot
 

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
 

Detailed Description

Provides access to Disks without mounting their contained filesystem (raw device access).

Definition at line 33 of file RawFs.h.

Constructor & Destructor Documentation

◆ RawFs()

RawFs::RawFs ( )

Definition at line 39 of file RawFs.cc.

◆ ~RawFs()

RawFs::~RawFs ( )
virtual

Definition at line 43 of file RawFs.cc.

Member Function Documentation

◆ cacheDirectoryContents()

virtual void RawFs::cacheDirectoryContents ( File *  pFile)
inlinevirtual

Definition at line 68 of file RawFs.h.

◆ createDirectory()

virtual bool RawFs::createDirectory ( File *  parent,
const String &  filename,
uint32_t  mask 
)
inlineprotectedvirtual

createDirectory calls this after it has parsed the string path.

Implements Filesystem.

Definition at line 76 of file RawFs.h.

◆ createFile()

virtual bool RawFs::createFile ( File *  parent,
const String &  filename,
uint32_t  mask 
)
inlineprotectedvirtual

createFile calls this after it has parsed the string path.

Implements Filesystem.

Definition at line 73 of file RawFs.h.

◆ createSymlink()

virtual bool RawFs::createSymlink ( File *  parent,
const String &  filename,
const String &  value 
)
inlineprotectedvirtual

createSymlink calls this after it has parsed the string path.

Implements Filesystem.

Definition at line 79 of file RawFs.h.

◆ fileAttributeChanged()

virtual void RawFs::fileAttributeChanged ( File *  pFile)
inlinevirtual

Definition at line 65 of file RawFs.h.

◆ getRoot()

File * RawFs::getRoot ( ) const
virtual

Returns the root filesystem node.

Implements Filesystem.

Definition at line 58 of file RawFs.cc.

◆ getVolumeLabel()

virtual const String & RawFs::getVolumeLabel ( ) const
inlinevirtual

Returns a string identifying the volume label.

Implements Filesystem.

Definition at line 50 of file RawFs.h.

◆ initialise()

virtual bool RawFs::initialise ( Disk *  pDisk)
inlinevirtual

Populates this filesystem with data from the given Disk device.

Returns
true on success, false on failure.

Implements Filesystem.

Definition at line 41 of file RawFs.h.

◆ probe()

static Filesystem * RawFs::probe ( Disk *  pDisk)
inlinestatic

Definition at line 44 of file RawFs.h.

◆ read()

virtual uint64_t RawFs::read ( File *  pFile,
uint64_t  location,
uint64_t  size,
uintptr_t  buffer,
bool  canBlock 
)
inlinevirtual

Definition at line 54 of file RawFs.h.

◆ removeNode()

virtual bool RawFs::removeNode ( File *  parent,
const String &  filename,
File *  file 
)
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.

Definition at line 82 of file RawFs.h.

◆ shutdown()

Filesystem::SyncStatus RawFs::shutdown ( )
virtual

After all users drain, finish teardown writes before backend destruction.

Reimplemented from Filesystem.

Definition at line 54 of file RawFs.cc.

◆ sync()

Filesystem::SyncStatus RawFs::sync ( )
virtual

Completes data, metadata and device writeback for changes made before entry.

Reimplemented from Filesystem.

Definition at line 50 of file RawFs.cc.

◆ truncate()

virtual void RawFs::truncate ( File *  pFile)
inlinevirtual

Definition at line 62 of file RawFs.h.

◆ write()

virtual uint64_t RawFs::write ( File *  pFile,
uint64_t  location,
uint64_t  size,
uintptr_t  buffer,
bool  canBlock 
)
inlinevirtual

Definition at line 58 of file RawFs.h.

Member Data Documentation

◆ m_pRoot

class RawFsDir* RawFs::m_pRoot
private

Definition at line 90 of file RawFs.h.


The documentation for this class was generated from the following files: