Replacement intent and mount-time recovery

This figure documents the historical i386 source baseline. Current native x86-64/AArch64 qualification is recorded separately; this is not an ELF64 or native SMP implementation diagram.

Replacement intent and mount-time recovery Persist an OLD intent with the saved inode pointers, stage a separate new block tree, install the replacement inode, then persist NEW before releasing old blocks and clearing intent. On mount, OLD restores saved pointers; NEW keeps the installed inode. Recovery rebuilds the allocation bitmap and clears intent. This is not protection against torn sectors or a device that violates the ordering model. start->old old->build build->install install->new new->reclaim recovery->rollback phase OLD recovery->keep phase NEW rollback->bitmap keep->bitmap start Replace regular-file content old Persist OLD intent save previous inode block pointers build Allocate + write new block tree install Install replacement inode new Persist NEW intent reclaim Release obsolete blocks clear intent recovery Mount sees replacement intent rollback OLD → restore saved inode keep NEW → keep installed inode bitmap Rebuild allocation bitmap then clear recovered intent note Ordered-I/O recovery, not torn-sector protection or a general transactional filesystem.
Replacement intent and mount-time recovery Persist an OLD intent with the saved inode pointers, stage a separate new block tree, install the replacement inode, then persist NEW before releasing old blocks and clearing intent. On mount, OLD restores saved pointers; NEW keeps the installed inode. Recovery rebuilds the allocation bitmap and clears intent. This is not protection against torn sectors or a device that violates the ordering model. Ordered-I/O recovery only. No torn-sector protection or general transaction guarantee. start->old old->build build->install install->new new->reclaim recovery->bitmap start Replace regular-file content old Persist OLD intent: save old inode block pointers build Allocate + write new block tree install Install replacement inode new Persist NEW intent reclaim Release old blocks; clear intent recovery Mount recovery sees intent OLD: restore saved inode NEW: keep installed inode bitmap Rebuild allocation bitmap clear recovered intent

OLD and NEW distinguish which inode version recovery keeps under the ordered-I/O model.

Text equivalent and source references
  • Persist an OLD intent with the saved inode pointers, stage a separate new block tree, install the replacement inode, then persist NEW before releasing old blocks and clearing intent.
  • On mount, OLD restores saved pointers; NEW keeps the installed inode. Recovery rebuilds the allocation bitmap and clears intent. This is not protection against torn sectors or a device that violates the ordering model.

Transaction / recovery flow. Source paths refer to the atlas baseline; the kernel checkout is private.

  • include/blockfs.h · slfs_intent
  • kernel/fs/blockfs.c · blockfs_write_file_locked, blockfs_init