summaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2024-02-04Make initramfs hook install mount.bcachefsSteinar H. Gunderson
Now that the bcachefs tool unconditionally includes the mount parts (or more correctly, you cannot build it at all if you don't have Rust), we can call copy_exec on mount.bcachefs, to get the symlink installed. In particular, this helps with mounting UUID mounts as /. See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060411 for the remaining parts needed in initramfs-tools itself.
2024-01-27fix(build): clean should delete top-level libbcachefs.aRyan Lahfa
I spent some minutes pestering Kent about weird counters issues, when, actually, `make clean` was keeping this artifact on my filesystem. Signed-off-by: Ryan Lahfa <bcachefs@lahfa.xyz>
2024-01-16Move c_src dirs back to toplevelKent Overstreet
We just wanted c sourcefiles out of the top level, not c source directories. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16move Rust sources to top level, C sources into c_srcThomas Bertschinger
This moves the Rust sources out of rust_src/ and into the top level. Running the bcachefs executable out of the development tree is now: $ ./target/release/bcachefs command or $ cargo run --profile release -- command instead of "./bcachefs command". Building and installing is still: $ make && make install Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16convert main() from C to RustThomas Bertschinger
This moves the main() function from C to Rust. It also updates the name of the Rust package from "bcachefs-rust" to "bcachefs-tools". Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-24Makefile, fsck: Use libexec instead of libNeal Gompa
These are executables that need to be installed in a non-path location. Most distributions now install these into /usr/libexec, and the path variable for this is LIBEXECDIR, so use that instead.
2023-12-23v1.4.0: Split brain detectionv1.4.0Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-22Makefile: avoid recursively expanding expensive variablesIvan Shapovalov
Specifically, do not recursively expand $(CFLAGS) because this leads to repeatedly performing compile tests (e. g. cc-disable-warning) on every recipe execution. Without (nproc=32): ``` $ time env -i PATH=/usr/bin BCACHEFS_FUSE=1 NO_RUST=1 make -j$(nproc) <...> [LD] bcachefs 72,48s user 11,29s system 190% cpu 44,036 total ``` With: ``` $ time env -i PATH=/usr/bin BCACHEFS_FUSE=1 NO_RUST=1 make -j$(nproc) <...> [LD] bcachefs 66,79s user 5,17s system 1955% cpu 3,679 total ```
2023-12-20remove Rust artifacts during `make clean`Thomas Bertschinger
This should use `cargo clean` instead of `rm -rf ...`. Also, due to a typo, the `rm` did not actually remove the Rust artifacts. Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-18v1.3.6v1.3.6Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-16Fix makefile when building without systemdKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-15Update bcachefs sources to 841a95c29f4c bcachefs: fix userspace build errorsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-09bcachefs-tools: Disable -Wgnu-variable-sized-type-not-at-end for clangChris Webb
clang's default warnings include -Wgnu-variable-sized-type-not-at-end, producing a lot of false alarms about the GNU extension for libbcachefs. Disable these using cc-disable-warning when building with clang. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-08bcachefs-tools: make 'all' the default Makefile goalTero Roponen
"fsck/bcachefsck_all:" coming before "all:" in the Makefile causes the bcachefs binary not being built by default. Fix this by explicitly setting the .DEFAULT_GOAL=all. Signed-off-by: Tero Roponen <tero.roponen@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-07Update bcachefs sources to 6d44812757dd bcachefs: BCH_IOCTL_FSCK_ONLINEKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-07fsck: add a service to schedule and run bcachefsck@ servicesDarrick J. Wong
Create a script that looks for mounted bcachefs filesystems and tries to run as many of them in parallel as possible without two different scrubbers hitting the same low level block device. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
2023-12-07fsck: add systemd service definitions for automatic online serviceDarrick J. Wong
Add some systemd service files so that bcachefs can automatically fsck mounted filesystems in the background. Hopefully with minimal disruption to frontend operations. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
2023-12-07Multiple small fuse fixes for write, api, and hardlinkTautvydas Nesvarbu
* changed in Makefile to use recomended fuse api 35; * force foreground mode, because fuse_daemonize is forking after initalization other bcachefs threads; * fix fuse_link, there where mistype in fuse_log (the paremeter need to be inum.inum); * The write_aligned is fixed, by wrapping struct bch_write_op into container with single closure and using end_io callback to release that closure.
2023-12-06fix udev rules pathAlexander Fougner
- include rules file in rpmspec - update install docs with udev build requirement Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-04misc: don't allow udisks to automount bcachefs filesystems with no promptorigin/master_2023-12-04Darrick J. Wong
The unending stream of syzbot bug reports and overwrought filing of CVEs for corner case handling (i.e. things that distract from actual user complaints) in XFS has generated all sorts of of overheated rhetoric about how every bug is a Serious Security Issue(tm) because anyone can craft a malicious filesystem on a USB stick, insert the stick into a victim machine, and mount will trigger a bug in the kernel driver that leads to some compromise or DoS or something. I thought that nobody would be foolish enough to automount an XFS filesystem. What a fool I was! It turns out that udisks can be told that it's okay to automount things, and then GNOME will do exactly that. Including mounting mangled XFS filesystems! Same with bcachefs! <delete angry rant about poor decisionmaking and armchair fs developers blasting us on X while not actually doing any of the work> Turn off /this/ idiocy by adding a udev rule to tell udisks not to automount bcachefs filesystems. This will not stop a logged in user from unwittingly inserting a malicious storage device and pressing [mount] and getting breached. This is not a substitute for a thorough audit. This is not a substitute for lklfuse. This does not solve the general problem of in-kernel fs drivers being a huge attack surface. I just want to give Kent a break from some of the oceans of bu******. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-30Update bcachefs sources to 71a5b27e017d bcachefs: Make backpointer fsck wb ↵Kent Overstreet
flush check more rigorous Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-22Update bcachefs sources to 783085c3cc44 kbuild: Allow gcov to be enabled on ↵Kent Overstreet
the command line Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-16Version is now specified in the makefileKent Overstreet
git describe doesn't work for tarball releases Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-04downgrade rust deps to compile for MSRVAlexander Fougner
- add helper for cargo update, whilst respecting MSRV Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-09-26Create symlinks on install with ln -sfKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-09-22Kill shell script wrappersKent Overstreet
nixos has trouble with the shell script wrappers - readlink isn't available by default! But, there's a better approach: just get rid of them and use symlinks instead, and have main() check what we're supposed to be. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-17Update bcachefs sources to a8115093df bcachefs: Fix divide by zero in ↵Kent Overstreet
rebalance_work()
2023-08-11fuse: Set fsname correctlyKent Overstreet
Also, add helpers for the fuse.bcachefs filesystem type; this means we can now test the fuse version with fstests. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-04ci: set and verify MSRVAlexander Fougner
To prevent uncontrolled usage of new rust features, directly or from dependencies, set a minimum supported Rust version and verify it builds. Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-06-08Sort input file listBernhard M. Wiedemann
so that libbcachefs.so builds in a reproducible way in spite of non-deterministic filesystem readdir order. See https://reproducible-builds.org/ for why this is good.
2023-06-04Update bcachefs sources to 7c0fe6f104 bcachefs: Fix bch2_fsck_ask_yn()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-02Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshotsv0.29Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-20Add a NO_RUST optionKent Overstreet
For systems without working rust/llvm/bindgen, add an option for building without Rust. This will be less of an option in the future, as more code gets rewritten in Rust. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-04-20Delete pytestKent Overstreet
These tests have never been useful; drop them. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2023-03-19Fix build dependenciesKent Overstreet
Incremental builds are fast again Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-08add rpm make target and fix up spec fileEric Sandeen
Add a new make target to build an rpm. This uses rpmbuild --build-in-place, so no SRPM is created. Also clean up the specfile to remove manually-added Requires: that will be auto-generated, add a couple new BuildRequires: and use macros for file locations. Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
2023-03-04Update bcachefs sources to 171da96d76 bcachefs: Drop some anonymous structs, ↵Kent Overstreet
unions
2023-02-21Rust now integrated into bcachefs binaryKent Overstreet
Rust is now required for building the bcachefs tool, and rust code is now fully integrated with the C codebase - meaning it is possible to call back and forth. The mount helper is now a subcommand, 'mount.bcachefs' is now a small shell wrapper that invokes 'bcachefs mount'. This will make it easier to start rewriting other subcommands in rust, and eventually the whole command line interface. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-09Update bcachefs sources to ea93c26e98 fixup! bcachefs: We can handle missing ↵Kent Overstreet
btree roots for all alloc btrees Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-01Makefile: build with -Wno-deprecated-declarationsKent Overstreet
This fixes a ZSTD warning. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-01-03make: remove libbcachefs.so when cleaning.Daniel Hill
Signed-off-by: Daniel Hill <daniel@gluo.nz>
2022-11-15bcachefs-tools: add tarball make targetEric Sandeen
This makes it easy to generate a tarball, which should eventually facilitate packaging: "make tarball" Note that it's currently using the $(VERSION) from git describe which may not be ideal once point releases are happening, but that holds true for everywhere $(VERSION) is used. All tar.xz files are removed via "make clean" Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
2022-11-15bcachefs-tools: Prettify make outputEric Sandeen
Make the default "make" output look more like kbuild; this makes errors and warnings much easier to spot. "Make V=1" will revert to showing the full command lines. This is done by redefining some implicit rules to add the echo and the quiet variable. These changes are similar to those in xfsprogs. and btrfs-progs This patch also silences things if pytest-3 is not found. Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
2022-11-13Update bcachefs sources to 8d3fc97ca3 bcachefs: Fixes for building in userspaceKent Overstreet
2022-10-15Update bcachefs sources to 3e93567c51 bcachefs: Switch to local_clock() for ↵Kent Overstreet
fastpath time source
2022-08-18Update bcachefs sources to dfaf9a6ee2 lib/printbuf: Clean up headersKent Overstreet
2022-04-08Update bcachefs sources to 6ddf061e68 bcachefs: Use a genradix for reading ↵Kent Overstreet
journal entries
2022-03-24check for libkeyutils with pkg-configBrett Holman
2022-01-12Makefile: We need to exclude hidden foldersDaniel B. Hill
Sometimes user-specific apps create .c files in hidden folders breaking make. Signed-off-by: Daniel B. Hill <daniel@gluo.nz>
2022-01-10Fix makefile for building docsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>