20 #ifndef EXT2FILESYSTEM_H 21 #define EXT2FILESYSTEM_H 23 #include "modules/system/vfs/Filesystem.h" 24 #include "pedigree/kernel/process/Mutex.h" 25 #include "pedigree/kernel/processor/types.h" 26 #include "pedigree/kernel/utilities/String.h" 65 virtual bool remove(
File *parent,
File *file);
69 File *parent,
const String &filename, uint32_t mask,
70 const String &value,
size_t type, uint32_t inodeOverride = 0);
81 void pinBlock(uint64_t location);
82 void unpinBlock(uint64_t location);
84 void sync(
size_t offset,
bool async);
86 uint32_t findFreeBlock(uint32_t inode);
97 Inode *getInode(uint32_t num);
98 void writeInode(uint32_t num);
100 void ensureFreeBlockBitmapLoaded(
size_t group);
101 void ensureFreeInodeBitmapLoaded(
size_t group);
102 void ensureInodeTableLoaded(
size_t group);
104 bool checkOptionalFeature(
size_t feature);
105 bool checkRequiredFeature(
size_t feature);
106 bool checkReadOnlyFeature(
size_t feature);
108 void increaseInodeRefcount(uint32_t inode);
109 bool decreaseInodeRefcount(uint32_t inode);
virtual bool createFile(File *parent, const String &filename, uint32_t mask)
Vector< size_t > * m_pInodeBitmaps
virtual bool createNode(File *parent, const String &filename, uint32_t mask, const String &value, size_t type, uint32_t inodeOverride=0)
Vector< size_t > * m_pBlockBitmaps
size_t m_nGroupDescriptors
A vector / dynamic array.
Vector< size_t > * m_pInodeTables
size_t findFreeBlocksInGroup(uint32_t group, size_t maxCount, Vector< uint32_t > &blocks)
virtual String getVolumeLabel() const
Superblock * m_pSuperblock
virtual File * getRoot() const
virtual bool createDirectory(File *parent, const String &filename, uint32_t mask)
void releaseBlock(uint32_t block)
virtual bool initialise(Disk *pDisk)
virtual bool createLink(File *parent, const String &filename, File *target)
bool releaseInode(uint32_t inode)
GroupDesc ** m_pGroupDescriptors
bool findFreeBlocks(uint32_t inode, size_t count, Vector< uint32_t > &blocks)
uintptr_t readBlock(uint32_t block)
void writeBlock(uint32_t block)
virtual bool createSymlink(File *parent, const String &filename, const String &value)