Impossible OS Docs

IXFS Core

What is it?

IXFS is Impossible OS's own filesystem and the one C: runs on. It uses 4 KiB blocks, extents, a write-ahead journal, CRC32C checksums on data blocks and copy-on-write snapshots. This roadmap first verifies each of those subsystems, then grows the inode from 128 to 256 bytes (format version 3) so IXFS can carry what Windows programs expect from NTFS: alternate data streams, security descriptors, hard links, symbolic links, extended attributes and object IDs. None of its eleven sections is complete; the shipped format is version 2.

How does it work?

On-disk layout. ixfs.h defines it. Block 0 holds a 512-byte superblock (magic 0x49584653, "IXFS") whose first 112 bytes are covered by a CRC32C. After it come the block bitmap, the checksum table, the inode table, the 16-block journal, the reference-count table and the snapshot table, and then the data blocks; each region's start is recorded in the superblock (s_bitmap_start, s_checksum_start, s_inode_start, s_journal_start, s_refcount_start, s_snapshot_start, s_data_start). An inode is 128 bytes, 32 to a block: size, times in seconds, four inline extents and a pointer to an overflow extent block. A directory entry is 256 bytes (a 4-byte inode number and a 252-byte name), so names are up to 251 characters; a longer name is cut short rather than refused. The inode count is fixed at format time: the host tool that builds the boot images writes 128 inodes, and the kernel formatter, which nothing calls yet, writes 256 (IXFS_DEFAULT_INODES in mkfs-ixfs.c and ixfs_internal.h).

Mounting C:. At boot, try_mount_ixfs_as_c() in partition.c calls ixfs_init() in ixfs_format.c on the active A/B slot. ixfs_init() checks the magic and version: a version 2 volume mounts read-write, a version 1 volume is flagged read-only, and any other version is refused. The version 1 flag is only partly enforced: write and create check it, but unlink, truncate and journal replay at mount do not, so mounting a version 1 volume does not guarantee its contents are left untouched. ixfs_init() then loads the bitmap and block groups, replays the journal and loads the snapshot and checksum tables. A superblock checksum mismatch is only a warning. Up to four IXFS volumes can mount at once, each with a 64-block cache.

Names. ixfs_strcmp() in ixfs_core.c compares names case-insensitively (ASCII only) and returns 1 when they are equal, and the directory hash in ixfs_inode.c folds to lower case, so C:\Readme.txt and C:\README.TXT are the same file. There is no per-volume case-sensitive switch.

What version 2 cannot hold. The inode has no room for Windows attributes, a creation time separate from change time, streams, a security descriptor ID or an object ID. Every file has a link count of 1 and there is no hard-link call. rename with replace-existing is refused (rename: REPLACE_EXISTING not supported (refused) in ixfs_ops.c).

Building images. The host tool mkfs-ixfs.c writes version 2 images for the boot disk; the kernel's ixfs_format() writes the same layout.

flowchart LR
    SB[superblock + CRC32C] --> BM[block bitmap]
    BM --> CK[checksum table]
    CK --> IT[inode table, 128 B inodes]
    IT --> J[journal]
    J --> RS[refcount + snapshot tables]
    RS --> D[data blocks via extents]

What are its interfaces?

Interface Purpose
ixfs_init(), ixfs_get_driver(), ixfs_get_root() Mount and VFS registration (ixfs_format.c)
ixfs_format() Create a version 2 volume
struct ixfs_superblock, struct ixfs_inode, struct ixfs_dir_entry On-disk structures, size-checked by _Static_assert (ixfs.h)
mkfs-ixfs -o <img> -s <size> [-l <label>] [--populate <dir>] Host image builder (mkfs-ixfs.c)

How do I use it?

Every boot mounts C: from IXFS. The serial log shows A/B: mounted slot <n> as C:, and at debug level the volume summary IXFS: "<label>" v2, <n> MiB, <free>/<total> blocks free, <k> inodes. make test-fs runs the IXFS layout suites in test_ixfs.c (superblock size and offsets, inode size) and the repair-pass suites described in IXFS Advanced Storage.

What is not implemented yet?

How does it compare with Windows 11 and Linux?

NTFS on Windows 11 has streams, $Secure descriptors, hard links, reparse points, extended attributes and object IDs, but no per-block checksums. Btrfs on Linux checksums data and metadata by default (CRC32C unless another algorithm is chosen) and scrubs, and ext4 offers optional per-directory case folding. IXFS already checksums data blocks and folds case, and plans to carry the NTFS feature set in one 256-byte inode.

See also

Impossible OS is free software under the GPL-3.0-only license. Last updated Edit this page on GitHub