bfcfs-linux

An out-of-tree Linux kernel module that mounts BFC containers read-only through the VFS — no FUSE, so ls, cat and cp just work.

Clinux · kernel · vfs · read-onlybfc & filesystemssource on github

Why

Mount a .bfc image directly, with native kernel I/O and no FUSE round-trips, so every standard tool can read the container like any other directory tree.

How

  • register_filesystem plus mount_nodev; the backing file is opened in-kernel and the superblock is marked read-only.
  • At mount time the module reads header, footer and index with kernel_read, checks the index CRC with the kernel’s crc32c(), and builds a string table and directory hierarchy for lookups.
  • Inodes come from iget_locked; directories implement lookup and iterate_shared; file data is served through read_iter and read_folio, computing each object’s content offset from the format.
  • Mount options: source= (required), verify=none|shallow|deep, noreadahead. Ships with DKMS config and MOK signing instructions.

Status

The Phase 0 MVP: uncompressed, unencrypted containers on kernel 6.8+. ZSTD and AEAD (via the kernel keyring) are the next phases; symlinks and xattrs come after.

sudo mount -t bfcfs -o source=/tmp/app.bfc,verify=deep /mnt/app
$ git clone https://github.com/zombocoder/bfcfs-linux
← all projects