No description
  • C 48.4%
  • Shell 20.9%
  • Rust 17.4%
  • Swift 5.6%
  • Python 4.3%
  • Other 3.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Conrad Kramer fdf8333e84
Some checks are pending
release-macos / Build unsigned macOS release input (push) Waiting to run
release-macos / Sign and notarize with Conrad KMS (push) Blocked by required conditions
release-macos / Verify with native Apple tooling (push) Blocked by required conditions
Prepare shipping macOS build 17 and publish through Garage
2026-11-23 00:38:01 -08:00
.forgejo/workflows Build macOS candidates in CI and wire Sparkle releases 2026-11-22 23:26:00 -08:00
artifacts Track canonical bcachefs test fixtures 2026-08-22 14:55:51 -07:00
BCache Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
BCacheCLI Add the read-only Swift command engine 2026-08-22 15:02:56 -07:00
BCacheFFI Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
BCacheFormat Add the native bcachefs formatter 2026-08-22 15:02:57 -07:00
BCacheFSKit Build macOS candidates in CI and wire Sparkle releases 2026-11-22 23:26:00 -08:00
BCacheFSKit.xcodeproj Prepare the repository for public collaboration 2026-08-22 15:05:43 -07:00
BCacheRust Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
BCacheRustCLI Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
BCacheTool Add the hardened bcachefs launcher distribution 2026-08-22 15:03:01 -07:00
BCacheWorker Add the offline maintenance worker 2026-08-22 15:02:59 -07:00
Compatibility/StorageKit/bcachefs.fs/Contents Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
documentation Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
evolution Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
External Implement the concurrent hosted bcachefs runtime 2026-08-22 15:02:25 -07:00
scripts Prepare shipping macOS build 17 and publish through Garage 2026-11-23 00:38:01 -08:00
Sources/CBcacheFS/compat/include/generated Bootstrap readonly bcachefs bring-up with Bazel 9 2026-02-28 21:50:22 -08:00
Tests Prepare shipping macOS build 17 and publish through Garage 2026-11-23 00:38:01 -08:00
.bazelrc Remove native I/O copies and global task wake broadcasts 2026-10-12 03:18:50 -07:00
.bazelversion Bootstrap readonly bcachefs bring-up with Bazel 9 2026-02-28 21:50:22 -08:00
.gitignore Validate real artifacts and add native APFS comparison workloads 2026-09-04 23:00:01 -07:00
.gitmodules Prepare the repository for public collaboration 2026-08-22 15:05:43 -07:00
BENCHMARKS.md Checkpoint FSKit runtime, tooling, and acceptance work 2026-11-22 23:08:50 -08:00
BUILD.bazel Build macOS candidates in CI and wire Sparkle releases 2026-11-22 23:26:00 -08:00
CONSTITUTION.md Accept the writable userspace runtime design 2026-08-22 15:01:52 -07:00
LICENSE Prepare the repository for public collaboration 2026-08-22 15:05:43 -07:00
MODULE.bazel Validate real artifacts and add native APFS comparison workloads 2026-09-04 23:00:01 -07:00
MODULE.bazel.lock Bootstrap readonly bcachefs bring-up with Bazel 9 2026-02-28 21:50:22 -08:00
README.md Build macOS candidates in CI and wire Sparkle releases 2026-11-22 23:26:00 -08:00
TESTING.md Prepare shipping macOS build 17 and publish through Garage 2026-11-23 00:38:01 -08:00

BCacheFSKit

BCacheFSKit is an experimental macOS FSKit implementation for bcachefs. It hosts reviewed bcachefs userspace code behind a C FFI, implements the shipping file-system extension in Rust, and includes native format, maintenance, and command-line tools.

The current generation focuses on multi-session and multi-thread correctness: per-resource lifecycle ownership, concurrent block I/O, journal publication, wait queues, RCU/SRCU, workqueues, and independent writable mounts all have focused tests. See TESTING.md for the source gate and live FSKit acceptance sequence, and BENCHMARKS.md for measured performance, artifact verification, and remaining acceptance checks.

The bundled bcachefs-rs helper can inspect and read images, format disposable media, check and explicitly repair filesystems, and clone regular files offline using native bcachefs reflinks. Clone destinations are published only after extent remapping completes. Hardware durability depends on the storage flush contract described in the write-readiness evidence. See the CLI contract for exact target confirmations and artifact acceptance for a repeatable format, real-file read, clone, and clean-reopen test.

Status

BCacheFSKit is pre-release software. Mounts are read-only by default. Writes require explicit opt-in and remain experimental: simulated crash and fault checks have exposed recovery problems in earlier builds, and the physical device-cache flush guarantee is not established. See write-readiness evidence before using a writable mount.

Mounted operations support regular files, directories, hardlinks and symbolic links, including link creation, rename and unlink. Creating a symbolic link whose target contains invalid UTF-8 remains limited by the observed FSKit callback behavior; see link support. Encrypted filesystems, mounted CoW cloning and several metadata setters are unsupported. Offline reflinks share file-data extents but do not copy extended attributes.

On a writable mount, reads can update a file's access time even when macOS reports the mount as noatime. An explicit strictatime request also conflicted with the reported mount flags in local testing. Access-time mount policy and remount behavior are not yet resolved; see the observed behavior.

Newly formatted volumes use native bcachefs user-namespace extended attributes (up to 1,984 bytes, with lower limits for longer names). Existing volumes use macOS AppleDouble storage. The root attribute com.bcachefskit.xattr-storage=native-v1 records the formatter's choice; manually adding it does not migrate existing metadata.

Disk Arbitration mounting is available through the installed extension and bcachefs-rs mount diskN / bcachefs-rs unmount diskN. Use --read-write to opt into experimental writes or --mount-point /absolute/existing/directory to choose a mount point. GPT Linux filesystem data partitions and MBR Linux partitions are discovered after superblock validation. On supported hosts an optional separate StorageKit catalog enables stock diskutil mounting; see StorageKit compatibility and the CLI contract.

The deployment minimum is macOS 15.4. On macOS 27, the extension selects available FSKit result handlers without changing the writable byte-count contract. A separate immutable kernel-I/O prototype is limited to explicitly marked, read-only filesystems and eligible unchecksummed, uncompressed, unencrypted data. Completion callbacks remain unverified; ordinary mounts use the native path. Its constraints and outstanding acceptance work are described in kernel offload.

Native handles have per-resource lifecycle ownership and per-handle execution; see Rust architecture and native execution. The test suite and historical experimental results are documented in TESTING.md, BENCHMARKS.md, and the linked acceptance records. Passing image or process-crash tests does not establish hardware power-loss durability.

Build and test

Use a case-sensitive filesystem for the checkout so all pinned kernel header paths can coexist. Initialize the two pinned upstream submodules, then run:

git submodule update --init --recursive
bazelisk --bazelrc=.bazelrc test //:release_tests

Use Bazelisk 1.28.1. The remote workflow pins the Apple-silicon binary by SHA-256 so a fresh clone does not depend on the ignored local .tools/ cache. Release builders verify the pinned kernel header tree before and after building; the current case-insensitive checkout fails that check and needs a fresh, complete checkout on a case-sensitive filesystem before a release build.

The local signed-bundle and live acceptance procedures require a local Apple Development identity and matching FSKit provisioning profile. Developer ID signing is reserved for the protected remote release lane.

Forgejo builds an unsigned arm64 candidate on pushes to main and uploads it after the release tests pass. The macOS runner needs a workspace that allows mounting a temporary case-sensitive volume for the checkout and Bazel output.

A protected main dispatch with publish enabled signs with Conrad's Developer ID key in Google Cloud KMS, notarizes and staples the app, and verifies it with Apple tools before publishing a signed Sparkle feed and update ZIP. The release gate is closed pending the post-generation-16 FSKit acceptance and signing setup documented in Testing.

Source modifications

Upstream bcachefs and bcachefs-tools are pinned to public commits. Hosted source mirrors, intentional shadows, compatibility wrappers, and their exact hashes are recorded in BCacheFFI/Sources/CBcacheFS/HOSTED_PROVENANCE.v1.tsv; rationale is in BCacheFFI/Sources/CBcacheFS/HOSTED_OVERRIDES.md.

BCacheFSKit is licensed under GPL-2.0-only. See LICENSE.