Mounted filesystems are available in sysfs at
/sys/fs/bcachefs/<uuid>/ with various options, performance counters
and internal debugging aids.
/sys/fs/bcachefs/<uuid>/options/, and settings changed via sysfs will be persistently changed in the superblock as well.
bcachefs tracks the latency and frequency of various operations and
events, with quantiles for latency/duration in the
promote_target. This is done asynchronously from the original read.
For each dirty btree node, prints:
need_writeflag is set
The level of the btree node
The number of sectors written
Whether writing this node is blocked, waiting for other nodes to be written
Whether it is waiting on a btree_update to complete and make it reachable on-disk
journal_pins Lists items pinning journal entries, preventing them
from being reclaimed.
Unit and performance tests
/sys/fs/bcachefs/<uuid>/perf_test runs various low
level btree tests, some intended as unit tests and others as performance
tests. The syntax is
echo <test_name> <nr_iterations> <nr_threads> > perf_test
When complete, the elapsed time will be printed in the dmesg log. The
full list of tests that can be run can be found near the bottom of
The contents of every btree, as well as various internal per-btree-node
information, are available under
For every btree, we have the following files:
Listing and dumping filesystem metadata
This subcommand is used for examining and printing bcachefs superblocks. It takes two optional parameters:
-l: Print superblock layout, which records the amount of space
reserved for the superblock and the locations of the backup
-f, –fields=(fields): List of superblock sections to print,
all to print all sections.
This subcommand gives access to the same functionality as the debugfs interface, listing btree nodes and contents, but for offline filesystems.
This subcommand lists the contents of the journal, which primarily records btree updates ordered by when they occured.
This subcommand can dump all metadata in a filesystem (including multi
device filesystems) as qcow2 images: when encountering issues that
fsck can not recover from and need attention from the developers,
this makes it possible to send the developers only the required
metadata. Encrypted filesystems must first be unlocked with