Ext4 orphan inode
An ext4 orphan inode is an inode tracked so recovery can finish deletion or remove excess allocations left by an interrupted truncation or extension.
An unlinked file may remain alive while open; ext4 records recovery work so a crash does not leave its inode and blocks permanently allocated. Linked files can also need orphan tracking when truncation or extension spans journal transactions, so orphan does not mean only a file without directory entries. [1] In Linux v6.12, ext4_process_orphan uses the recovered link count: linked inodes are truncated to the recovered inode size, while zero-link inodes are released for deletion. [2] See the Hesela analysis for the relationship to journal replay. [4]
Relations
- related
- inode, unlink, ext4-orphan-file, read-only-mount
Limitations
- Linux v6.12 increments nr_truncates even after an ext4_truncate error if execution continues; its cleanup count alone does not certify successful repair. Read accompanying errors. [2]
- Cleanup reclaims allocations; it is not undelete, secure sanitization, or an application durability guarantee. [2, 3]
- In Linux v6.12, cleanup skips a read-only block device but may temporarily permit writes for a read-only filesystem mount on writable media; read-only mounting alone is not a no-write guarantee. [2]