I wanted to design my own filesystem for the eZ8 computer. I wanted to make it very simple to implement. It has these features:
-Block size:512 bytes (4 bytes per block reserved for filesystem)
-16 character filenames
-Wear leveling
-File fragmenting
-Variable-size file headers
-Scratching files by writing just two bytes
-No need for file indexing
-No need to alter the file header when appending new data to a file
-Flags for things like: executable, system/user-file
-Extended addressing for accessing external media like flash roms
-No directories yet, but can be implemented later on.
File structure:
File header:
offset | size | function
+0 2 file identifier (0x0002 for start of file)
+2 2 size of header (not including first 4 bytes)
+4 16 filename
+20 2 flags: executable,system/user-file
+22 2 address of next block
+24 2 size of block
(+26 2 extended address)
-- Stream of Data --
Block header:
offset | size | function
+0 2 address to next block
+2 2 size of block (not including first 4 bytes)
-- Stream of Data --
File identifiers:
0x0000 Scratched file (file can be erased if no free blocks are available)
0x0002 Start of file
0xFFFE Invalid. Used to identify the last block in a file.
0xFFFF Free block
What do you think about this filesystem? Any suggestions/foreseen problems?