21 #include "Ext2Filesystem.h" 23 #include "pedigree/kernel/utilities/utility.h" 31 name, LITTLE_TO_HOST32(inode->i_atime),
32 LITTLE_TO_HOST32(inode->i_mtime), LITTLE_TO_HOST32(inode->i_ctime),
34 LITTLE_TO_HOST32(inode->i_size),
38 uint32_t mode = LITTLE_TO_HOST32(inode->i_mode);
56 Ext2Node::extend(newSize, 0, 0);
62 Ext2Node::extend(newSize, location, size);
76 m_Size, m_AccessedTime, m_ModifiedTime, m_CreationTime);
78 getUid(), getGid(), permissionsToMode(getPermissions()));
83 return Ext2Node::readBlock(location);
88 Ext2Node::writeBlock(location);
93 Ext2Node::pinBlock(location);
98 Ext2Node::unpinBlock(location);
103 Ext2Node::sync(offset, async);
virtual void pinBlock(uint64_t location)
Ext2File(const Ext2File &file)
virtual void preallocate(size_t expectedSize, bool zero=true)
void setUidOnly(size_t uid)
void fileAttributeChanged()
virtual void writeBlock(uint64_t location, uintptr_t addr)
virtual void extend(size_t newSize)
void setPermissionsOnly(uint32_t perms)
void updateMetadata(uint16_t uid, uint16_t gid, uint32_t perms)
bool ensureLargeEnough(size_t size, uint64_t location, uint64_t opsize, bool onlyBlocks=false, bool nozeroblocks=false)
void setGidOnly(size_t gid)
virtual size_t getBlockSize() const
virtual uintptr_t readBlock(uint64_t location)
virtual void unpinBlock(uint64_t location)