From a2df3cdb17330addd117938df71696ffbb2f1aae Mon Sep 17 00:00:00 2001 From: Amlal Date: Sun, 4 May 2025 09:09:49 +0200 Subject: feat(filesystem): Update HeFS implementation and specifications. Signed-off-by: Amlal --- dev/kernel/FSKit/HeFS.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'dev/kernel/FSKit/HeFS.h') diff --git a/dev/kernel/FSKit/HeFS.h b/dev/kernel/FSKit/HeFS.h index 83d93f8c..7d84c2e7 100644 --- a/dev/kernel/FSKit/HeFS.h +++ b/dev/kernel/FSKit/HeFS.h @@ -132,7 +132,7 @@ inline constexpr Kernel::ATime kHeFSTimeMax = 0xFFFFFFFFFFFFFFFF - 1; /// @note The index node is a special type of INode that contains the file information. /// @note The index node is used to store the file information of a file. struct PACKED HEFS_INDEX_NODE final { - Kernel::Utf8Char fName[kHeFSFileNameLen]; /// @brief File name. + Kernel::UInt64 fHashPath; /// @brief File name. Kernel::UInt32 fFlags; /// @brief File flags. Kernel::UInt16 fKind; /// @brief File kind. (Regular, Directory, Block, Character, FIFO, Socket, /// Symbolic Link, Unknown). @@ -146,9 +146,9 @@ struct PACKED HEFS_INDEX_NODE final { Kernel::UInt32 fUID, fGID; /// @brief User ID and Group ID of the file. Kernel::UInt32 fMode; /// @brief File mode. (read, write, execute, etc). - Kernel::UInt64 fBlock[kHeFSSliceCount]; /// @brief block slice. + Kernel::UInt64 fSlices[kHeFSSliceCount]; /// @brief block slice. - Kernel::Char fPad[69]; + Kernel::Char fPad[317]; }; enum { @@ -162,14 +162,13 @@ enum { /// @details This structure is used to store the directory information of a file. /// @note The directory node is a special type of INode that contains the directory entries. struct PACKED HEFS_INDEX_NODE_DIRECTORY final { - Kernel::UInt64 fHashName; /// @brief Directory name. + Kernel::UInt64 fHashPath; /// @brief Directory name. Kernel::UInt32 fFlags; /// @brief File flags. Kernel::UInt16 fKind; /// @brief File kind. (Regular, Directory, Block, Character, FIFO, Socket, /// Symbolic Link, Unknown). Kernel::UInt32 fEntryCount; /// @brief Entry Count of this directory inode. - Kernel::UInt32 fChecksum, - fIndexNodeChecksum; /// @brief Checksum of the file, index node checksum. + Kernel::UInt32 fChecksum; /// @brief Checksum of the file, index node checksum. Kernel::ATime fCreated, fAccessed, fModified, fDeleted; /// @brief File timestamps and allocation status. @@ -180,12 +179,12 @@ struct PACKED HEFS_INDEX_NODE_DIRECTORY final { /// [0] = OFFSET /// [1] = SIZE /// @note Thus the += 2 when iterating over them. - Kernel::UInt64 fIndexNode[kHeFSSliceCount]; /// @brief Start of the index node. + Kernel::UInt64 fINSlices[kHeFSSliceCount]; /// @brief Start of the index node. Kernel::UInt8 fColor; /// @brief Color of the node. (Red or Black). Kernel::Lba fNext, fPrev, fChild, fParent; /// @brief Red-black tree pointers. - Kernel::Char fPad[281]; + Kernel::Char fPad[285]; }; namespace Kernel::Detail { @@ -392,4 +391,4 @@ class HeFileSystemParser final { /// @brief Initialize HeFS inside the main disk. /// @return Whether it successfuly formated it or not. Boolean fs_init_hefs(Void); -} // namespace Kernel::HeFS \ No newline at end of file +} // namespace Kernel::HeFS -- cgit v1.2.3