- C 48.4%
- Shell 20.9%
- Rust 17.4%
- Swift 5.6%
- Python 4.3%
- Other 3.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| artifacts | ||
| BCache | ||
| BCacheCLI | ||
| BCacheFFI | ||
| BCacheFormat | ||
| BCacheFSKit | ||
| BCacheFSKit.xcodeproj | ||
| BCacheRust | ||
| BCacheRustCLI | ||
| BCacheTool | ||
| BCacheWorker | ||
| Compatibility/StorageKit/bcachefs.fs/Contents | ||
| documentation | ||
| evolution | ||
| External | ||
| scripts | ||
| Sources/CBcacheFS/compat/include/generated | ||
| Tests | ||
| .bazelrc | ||
| .bazelversion | ||
| .gitignore | ||
| .gitmodules | ||
| BENCHMARKS.md | ||
| BUILD.bazel | ||
| CONSTITUTION.md | ||
| LICENSE | ||
| MODULE.bazel | ||
| MODULE.bazel.lock | ||
| README.md | ||
| TESTING.md | ||
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.