Page 1 of 1

UltiFS – journaling file system for the Ultimem

Posted: Sat Aug 27, 2016 5:42 am
by pixel
Work in progress and rather straightforward:

# First eight 8K blocks:
0: Primary boot loader and whatever else.
1-7: Whatever

# Rest of the 64K blocks following.
0: Filesystem info + journal
1: Block chains of files.
2: File index, pointing to first blocks of files.
3-5: Reserved for rebuilt journal, block chains and files indexes.
6: GC scratch pad
7-last: File data

Each record in 1 and 2 starts with a pointer into the journal (-1 if unused). When a record needs to be updated the new version is stored in the journal. And that one can be updated the same way until the journal is full and it's time for garbage collection and defragmentation. Then the system switches to banks 3-5. They take turns.

Directories are also files. The root directory has file ID 0. The directory entries also start with a pointer into the journal. So, directories need to be cleaned up as well.

This should be simple enough to have the primary boot loader start up the secondary boot loader in the file system. Am wondering how long the garbage collection will take. But then again partial GCs should also do.

You can find more about the data structures being used in the command–line version intended to prove the concept before the code is being ported to the VIC here: https://github.com/SvenMichaelKlose/g/b ... r/ultifs.c

One special feature planned so far: files allocated at 8K boundaries on request.

Please keep me from doing something stupid. :mrgreen: