X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Design%20Notes%2FAcessFS.txt;fp=Design%20Notes%2FAcessFS.txt;h=7c74bebda3261a133944fd5147162595dc580bc6;hb=4d04d710e6d90ac28524925859a7ef621c675bcb;hp=0000000000000000000000000000000000000000;hpb=86f49ede5038704ac4f12eab9794e9a8110a4985;p=tpg%2Facess2.git diff --git a/Design Notes/AcessFS.txt b/Design Notes/AcessFS.txt new file mode 100644 index 00000000..7c74bebd --- /dev/null +++ b/Design Notes/AcessFS.txt @@ -0,0 +1,54 @@ +Acess File System +- Database Design + +== Data Strutures == +Blocks are of a size specified in the superblock +- Superblock + > Fixed offset: 1024 bytes +- Field Table + > Offset set in superblock +- Index Table +- Inode Table + +=== Superblock === +struct sSuperblock { + Uint8 Magic[4]; // == '\xACFS'+Version + Uint8 BlockSize; // TrueSize = 2^(7+BlockSize) +}; + +=== Field Table === +struct sFieldTableEntry { + Uint16 Ident; + Uint8 Type; + Uint8 Length; + char Text[]; +} FieldTable[SuperBlock.NFields]; + +=== Index Table == +struct sIndexTableEntry { + Uint16 Field; + Uint16 CheckSum; + Uint32 Block; +} IndexTable[SuperBlock.NFields]; + +=== Index Table entry == +struct { + Uint32 NumEntries; + Uint32 Links[]; +}; + +=== Inode Table === +struct sInodeTable { + +}; + +=== Inode === +struct sInodeEntry { + Uint16 Name; + Uint8 Size; + Uint8 Checksum; + Uint8 data[]; +}; + +Each `sInodeEntry` defines an entry in a "database" +