bucket size now takes into account system memory and amount of memory
required to fsck: on very large filesystems it will automatically scale
up bucket size to ensure we can fsck.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Picked armv7l-linux but i686-linux would probably also work. Not sure
which one is more important to check for.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Having a build that uses the actual version of Rust specified in
Cargo.toml should allow us to catch issues with breaking MSRV compat
more easily.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Adds packages for every member of systems from any of the systems. Since
rust-overlay is more or less basically like rustup, we get to just have
all of those targets without having to build quite as much of the
toolchain.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
When this environment variable is set, e.g. for some cross compile
setups, the target dir is nested a little further.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This means that the flake can now be built for the following
architectures:
- aarch64-linux
- armv6l-linux
- armv7l-linux
- i686-linux
- powerpc64le-linux
- riscv64-linux
- x86_64-linux
It doesn't mean that it's necessarily going to work perfectly on all of
these architecture and binary cache support is not available for a lot
of them either. But at least it let's you build for them if you want to.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
More work to regularize device options, with common command line
parsing - like other options.
This fixes an assortment of little nits: buggyness with the discard
option, device state (and others) can now be specied at device add time,
and is a decent cleanup.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-a is used when called from system to mean "automatic invocation, run
check only if you think you need it".
Since we have self healing and online fsck, we never need run fsck
automatically at boot time.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
New tool for scanning for backup superblocks, to recover when the
primary superblock + sb layout have been overwritten.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
there's a strange bug in liburcu's usage of c11 atomics turning up with
gcc 15; switch to using c11 atomics directly to work around this.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Implement 'bcachefs data scrub', frontend for
BCH_IOCTL_DATA.BCH_DATA_OP_scrub.
Takes a path to a device, mountpoint, or filesystem uuid. Can be run on
a specific device by passing a device, or if run on a filesystem scrubs
all devices in parallel.
Metadata only scrubbing is supported via -m.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
After upgrading liburcu to v0.15.0, bcachefs-tools failed to build. This patch
fixes build errors on liburcu v0.15.0.
Signed-off-by: Integral <integral@archlinuxcn.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Currently, 'bcachefs set-fs-option' requires all devices to be specified
when setting options on an offline multidevice filesystem - it can't yet
scan for the rest of the filesystem members.
We do need to fix this, but the scan code is written in Rust, so that
either means a lot of ugly FFI code or rewriting cmd_set_option() in
Rust - neither of which are happening today.
So as an interim hack, add a --dev-idx option: this can be specified
(multiple times if desired) for indicating which devices the device
specific options should be applied to.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>