June 25, 2025 at 5:36 PM, "Milos Nikic" <nikic.mi...@gmail.com mailto:nikic.mi...@gmail.com?to=%22Milos%20Nikic%22%20%3Cnikic.milos%40gmail.com%3E > wrote:
> > Hi all, > > As a learning and exploration effort, I've started working on a toy > journaling layer inside ext2fs. The goal is to understand how journaling > might look in a user-space filesystem like Hurd’s, and whether it's feasible > to implement a basic journaling mechanism incrementally. > > So far, I’ve added a non-intrusive skeleton that: > - Hooks into `diskfs_init_diskfs` (for init) and `diskfs_sync_everything` > (for flushing), > - Buffers log entries in memory and flushes to `/tmp/journal.log`, > - Outputs to the screen during boot if writing fails (e.g., due to early boot > or read-only FS), > - Is wrapped in a minimal interface (`journal_log`, `flush_journal_to_file`) > with guards for safety. > > The goal is **not** a production journaling layer, but rather to build a base > to explore correctness, crash safety, and design directions. > > You can see it show up during boot with messages like: > > Toy journaling: journal_init() called > Toy journaling: flushing journal to disk... > > I can also verify the presence of one of the init messages in /tmp/journal.log > > Before proceeding further: > - I'd appreciate any guidance on whether this is being plugged in the right > places. > - Are there preferred conventions or hooks I should be using instead? > - Would you be open to reviewing it as a small patch series while I iterate, > or should this stay on a branch until it's more mature? I would go ahead and share the source. :) > > Thanks in advance for any input — and for the warm welcome so far! > > Best, > Milos Nikic >