summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-07 16:49:00 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-07 16:49:00 +0100
commitea0fd7c03e98231d88ad201c1ef7a15f2445bb92 (patch)
tree6104e08c75ff610fac9dab4af1e49217f186742c /dev/Kernel
parent9c1c2beb24ed553d83453d413e8c73479c59f7de (diff)
ADD: Working on Best-Buddy tracker alongside SATA...
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel')
-rw-r--r--dev/Kernel/FSKit/NeFS.h5
-rw-r--r--dev/Kernel/src/FS/NeFS.cc8
2 files changed, 8 insertions, 5 deletions
diff --git a/dev/Kernel/FSKit/NeFS.h b/dev/Kernel/FSKit/NeFS.h
index c56d5838..ffd56d03 100644
--- a/dev/Kernel/FSKit/NeFS.h
+++ b/dev/Kernel/FSKit/NeFS.h
@@ -167,8 +167,13 @@ struct PACKED NEFS_CATALOG_STRUCT final
Kernel::Lba DataFork;
Kernel::Lba ResourceFork;
+ /// Tree allocation tracker.
Kernel::Lba NextSibling;
Kernel::Lba PrevSibling;
+
+ /// Best-buddy tracker.
+ Kernel::Lba NextBestSibling;
+ Kernel::Lba NextPrevSibling;
};
/// @brief Fork type, contains a data page.
diff --git a/dev/Kernel/src/FS/NeFS.cc b/dev/Kernel/src/FS/NeFS.cc
index adceb429..e0e3483c 100644
--- a/dev/Kernel/src/FS/NeFS.cc
+++ b/dev/Kernel/src/FS/NeFS.cc
@@ -106,8 +106,6 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NEFS_FORK_STRUCT& the_fork)
StringBuilder::Equals(cur_fork.CatalogName, the_fork.CatalogName))
break;
- kout << "Next fork: " << hex_number(cur_fork.NextSibling) << endl;
-
lba_prev = lba;
lba = cur_fork.NextSibling;
@@ -142,7 +140,7 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NEFS_FORK_STRUCT& the_fork)
drv.fPacket.fPacketSize = sizeof(NEFS_FORK_STRUCT);
drv.fPacket.fPacketContent = &the_fork;
- kout << "Writing fork metadata...\r";
+ kout << "Allocating fork block...\r";
// drv.fOutput(drv.fPacket);
@@ -857,7 +855,7 @@ _Output NEFS_CATALOG_STRUCT* NeFileSystemParser::GetCatalog(_Input const Char* n
/// @brief Closes a catalog, (frees it).
/// @param catalog the catalog to close.
/// @return
-Boolean NeFileSystemParser::CloseCatalog(_Input _Output NEFS_CATALOG_STRUCT* catalog)
+_Output Boolean NeFileSystemParser::CloseCatalog(_Input _Output NEFS_CATALOG_STRUCT* catalog)
{
if (!catalog)
return false;
@@ -871,7 +869,7 @@ Boolean NeFileSystemParser::CloseCatalog(_Input _Output NEFS_CATALOG_STRUCT* cat
/// @brief Mark catalog as removed.
/// @param catalog The catalog structure.
/// @return if the catalog was removed or not.
-Boolean NeFileSystemParser::RemoveCatalog(_Input const Char* catalog_name)
+_Output Boolean NeFileSystemParser::RemoveCatalog(_Input const Char* catalog_name)
{
if (!catalog_name ||
StringBuilder::Equals(catalog_name, NeFileSystemHelper::Root()))