Commit Graph

189 Commits

Author SHA1 Message Date
Kent Overstreet
8642d4ae10 Update bcachefs sources to 7c0fe6f104 bcachefs: Fix bch2_fsck_ask_yn()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-06-04 18:10:29 -04:00
Kent Overstreet
6b1f79d5df Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-05-02 00:41:47 -04:00
Kent Overstreet
0f37f9f05f Add a NO_RUST option
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-20 12:36:16 -04:00
Kent Overstreet
700afe1939 Delete pytest
These tests have never been useful; drop them.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2023-04-20 12:18:59 -04:00
Kent Overstreet
d22c79d2ff Fix build dependencies
Incremental builds are fast again

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-19 15:32:43 -04:00
Eric Sandeen
3deb1e0b17 add rpm make target and fix up spec file
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-08 10:26:44 -05:00
Kent Overstreet
b0c9ad15f4 Update bcachefs sources to 171da96d76 bcachefs: Drop some anonymous structs, unions 2023-03-04 23:33:25 -05:00
Kent Overstreet
28f703cc25 Rust now integrated into bcachefs binary
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-21 01:03:08 -05:00
Kent Overstreet
a104f0407b Update bcachefs sources to ea93c26e98 fixup! bcachefs: We can handle missing btree roots for all alloc btrees
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-09 18:36:24 -05:00
Kent Overstreet
97880a7ce4 Makefile: build with -Wno-deprecated-declarations
This fixes a ZSTD warning.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-01 16:34:14 -05:00
Daniel Hill
ccaca683b2 make: remove libbcachefs.so when cleaning.
Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-01-03 16:58:55 +13:00
Eric Sandeen
d9905d97d0 bcachefs-tools: add tarball make target
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-15 14:54:13 -05:00
Eric Sandeen
cde2d0e2fc bcachefs-tools: Prettify make output
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-15 14:18:47 -05:00
Kent Overstreet
c1e4d447f6 Update bcachefs sources to 8d3fc97ca3 bcachefs: Fixes for building in userspace 2022-11-13 20:07:22 -05:00
Kent Overstreet
e0a51ccce8 Update bcachefs sources to 3e93567c51 bcachefs: Switch to local_clock() for fastpath time source 2022-10-15 01:04:30 -04:00
Kent Overstreet
dded444b20 Update bcachefs sources to dfaf9a6ee2 lib/printbuf: Clean up headers 2022-08-18 12:49:48 -04:00
Kent Overstreet
986533d8d5 Update bcachefs sources to 6ddf061e68 bcachefs: Use a genradix for reading journal entries 2022-04-08 19:26:30 -04:00
Brett Holman
74c00c643e check for libkeyutils with pkg-config 2022-03-24 11:16:35 -06:00
Daniel B. Hill
2c0d0c4b7b Makefile: We need to exclude hidden folders
Sometimes user-specific apps create .c files in hidden folders breaking make.

Signed-off-by: Daniel B. Hill <daniel@gluo.nz>
2022-01-12 17:31:04 +13:00
Kent Overstreet
b3984515eb Fix makefile for building docs
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-01-10 21:38:14 -05:00
Kent Overstreet
1388212eb8 Delete old bcachefs.5 from makefile 2021-12-20 15:24:22 -05:00
Kent Overstreet
d06f5690fa Update bcachefs sources to ff3a76e1af bcachefs: Change need_whiteout_for_snapshot() to clone iterator 2021-12-19 19:37:29 -05:00
Chris Webb
49923376d1 Use scrypt from libsodium
bcachefs-tools has both libscrypt and libsodium as build dependencies,
but libsodium already includes the same scrypt implementation as libscrypt,
originally written by Colin Percival.

Use the libsodium copy, dropping the extra libscrypt dependency.

Explicitly adopt the default scrypt N, r and p values from libscrypt to
avoid unintended changes in the default work parameters for bcachefs.

Signed-off-by: Chris Webb <chris@arachsys.com>
2021-10-23 12:16:08 -04:00
Kayla Firestack
ae3d49e823 Makefile: fix rst2man lookup and add pytest lookup
add pytest and rst2man lookups though command-v and which if available,
default to ENV/ARGS in the case of user specified locations and otherwise lookup via shell

Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-20 09:30:16 -04:00
Kayla Firestack
045f7d2ba1 Makefile: prefix libbcachefs.so installation with DESTDIR
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-19 14:43:08 -04:00
Kayla Firestack
f403ef61e7 rst2man: convert which to command -v
Signed-off-by: Kayla Firestack <dev@kaylafire.me>
2021-10-19 14:28:34 -04:00
Igor Velkov
a77c35a1c4 fix "no rst2man found!" build error on debian and ubuntu 2021-10-18 17:41:11 -04:00
Kent Overstreet
4ee9ebc32e Build with -fPIC
The changes to how we integrate with rust code mean that we now need to
be emitting position indepedent code.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-10-18 16:57:08 -04:00
Kayla Firestack
1f8fc31ddc split mount into a library crate for rust reuse
update makefile to output shared library and rust build
fix default.nix to properly get the binary name for `ln`ing - move binary to main.rs
add rustfmt and gitignore files
move build.rs file into bch_bindgen for reuse between projects
add outputs to nix flake and checks
add mount.toml to makefile
2021-10-18 16:30:52 -04:00
Brett Holman
08420d2481 Fix errors related to rst2man warning message:
- Warning message doesn't print and causes build to exit.
- .SHELLSTATUS doesn't work on some versions of Make.

Signed-off-by: Brett Holman <bholman.devel@gmail.com>
2021-10-12 00:37:02 -04:00
Brett Holman
60a6b2882e Clean up smoketest and pytests.
- Replace depreciated tempfile with mktemp in smoketest.
- Remove unused pytest imports and variables.
- Make path lookup less fragile. Allows pytest to run from any cwd.
- Prevent exeptions caused by calling functions/methods on None objects.
- Disable fuse tests in smoketest. These are broken and add noise.
- Add missing travis CI dependency.

Signed-off-by: Brett Holman <bholman.devel@gmail.com>
2021-10-11 20:24:12 -06:00
Kent Overstreet
f06b01e9ea Update bcachefs sources to b964c6cba8 bcachefs: Change lockrestart_do() to always call bch2_trans_begin() 2021-07-28 17:26:50 -04:00
jpsollie
cb09c48a26 fixup! rst2man detection hangs
rst2man tend to hang when called without arguments, so a small -V is appended to print the version.
Also, make sure we found at least one rst2man executable

Signed-off-by: jpsollie <janpieter.sollie@edpnet.be>
2021-07-24 17:10:10 -04:00
jpsollie
0b0b0ee234 Reapply compiler checks
The compiler checks where erroneously reverted in the Makefile - this reapplies them,
so GCC < 10 can still build the bcachefs tools

Signed-off-by: jpsollie <janpieter.sollie@edpnet.be>
2021-07-24 17:10:10 -04:00
Stijn Tintel
05c9879524 Makefile: detect rst2man
On some distros, rst2man has a .py extension and there is no rst2man.
Fix build on such systems by detecting what is available.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-07-24 14:18:40 -04:00
Kent Overstreet
632feaa69a Bring back debug makefile target
This seems to have been dropped by mistake

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-07-23 18:06:02 -04:00
Brett Holman
8e6f35cbf3 Documentation fixup: made filenames more descriptive, switched parsing utility to python 2021-07-10 13:51:03 -04:00
jpsollie
54d44fe56b add bcachefs xor / xxhash support
Following the initial xxhash / xor checksum support patches in kernel, bcachefs-tools needs some updated libraries as well.
Unfortunately, xor functionality is deeply linked into several low-level functions, so we're adding a set of patches here to translate those into userspace

Signed-off-by: Janpieter Sollie <janpieter.sollie@edpnet.be>
2021-07-07 20:30:39 -04:00
Kent Overstreet
8e07f30cd7 Fix some makefile misspellings
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-07-06 13:41:31 -04:00
Brett Holman
b916af97dd Switched documentation from asciidoc to rst, added doc autogeneration code for options 2021-07-06 00:15:44 -06:00
Kent Overstreet
07ec713e05 Update bcachefs sources to 1a510b00b6 bcachefs: Increase BTREE_TRANS_MEM_MAX 2021-07-04 23:33:54 -04:00
jpsollie
d228e43048 Cleanup Makefile for better compatibility + enable "make debug"
- clean up Makefile to improve compiler compatibility
- add a "Make debug" target for easier debug builds
- update INSTALL
- fix six.c when running "make debug" against GCC 9 (maybe-uninitialized)

Signed-off by: Janpieter Sollie <janpieter.sollie@edpnet.be>
2021-06-13 01:14:47 -04:00
Stijn Tintel
cec9ecc7e0 Makefile: rename D to BCACHEFS_DEBUG
BCACHEFS_DEBUG is far more descriptive. D also conflicts with the D
variable used in Gentoo ebuilds.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-05-24 23:34:38 +03:00
Brett Holman
9c0dc7b8d4 minor fixes for clang support 2021-05-19 23:26:13 -04:00
Kent Overstreet
a2094890a9 Update bcachefs sources to 18686af684 bcachefs: Inode backpointers 2021-03-29 00:22:38 -04:00
Kent Overstreet
dd707c9bfd Update bcachefs sources to 0010403265 bcachefs: Fix spurious alloc errors on forced shutdown 2020-12-03 13:13:53 -05:00
Kent Overstreet
eff87a4c44 Build with -Wno-zero_length_bounds
Copying the linux kernel build settings
2020-10-15 22:54:22 -04:00
Kent Overstreet
487ddeb03c Add a shell script version of mount.bcachefs
Sadly, some people are still running distributions too old to properly
support rust :( In the long term we'd like to use Rust for more of
userspace (and potentially in the kernel); this is just a stopgap
measure.
2020-08-24 23:17:17 -04:00
Kent Overstreet
9b3a770ae3 make D=1 now implies valgrind
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2020-08-24 16:27:42 -04:00
Kent Overstreet
21ade39653 Initial WIP new user's manual 2020-07-25 16:20:56 -04:00
Kent Overstreet
34c9be19b3 Update bcachefs sources to e1f6739c4a bcachefs: Fix another iterator counting bug 2020-05-14 21:48:52 -04:00
Kent Overstreet
f55b90dec9 Don't build mount.bcachefs by default
So as not to depend on rust yet
2020-05-08 21:25:12 -04:00
Yuxuan Shui
57ada395b2 Add a mount.bcachefs tool
This tool currently has most of the fundmental features implemented.
It can mount a filesystem specified by uuid, it can ask password for an
encrypted filesystem.

There may be some work that needs to be done to make it behave more like
a "mount.*" tool.

Related: #1

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-05-05 21:33:40 +01:00
Kent Overstreet
9073be1298 Don't use pkgconfig for libkeyutils
Centos 7 has an old version that doesn't have the .pc file
2020-04-23 21:16:05 -04:00
Kent Overstreet
2bd18f4bae Use pkgconfig for libkeyutils 2020-03-25 16:01:38 -04:00
Justin Husted
3b8db3d7be bcachefs-tools: Add a smoke test master script.
This script builds and runs with various options to enable easy test
coverage.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-28 17:08:10 -08:00
Brendon Boldt
7beefecf44 Add Fedora, Ubuntu, Arch info to INSTALL
Add fuse3 (>=3.7) version to Makefile
2019-12-06 11:19:42 -05:00
Kent Overstreet
f712a866a4 Put valgrind support behind CONFIG_VALGRIND 2019-12-04 17:49:34 -05:00
Justin Husted
a00998c4cd Make fuse3 support optional and document.
The experimental fuse3 support is not complete yet, and fuse3 is new and
still difficult to install on some platforms.

Make it optional at compile time, and default to off.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-11 12:18:22 -08:00
Justin Husted
4ed889295c Add makefile support for tags.
Also, update .gitignore for various things.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-04 21:23:46 -08:00
Justin Husted
61bc316a4d Initial version of bcachefs tests.
So far, these tests just test basic format, fsck, and list functions
under valgrind, as well as a few self-validation tests.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00
Kent Overstreet
bc45c28470 fuse 2019-10-18 16:23:39 -04:00
Kent Overstreet
8b02f791c3 Build with -fno-delete-null-pointer-checks
Some of the code we use from the Linux kernel won't build correctly
without this...
2019-08-27 13:33:57 -04:00
Danilo Spinella
54badc02f7 Add PKG_CONFIG variable and replace pkg-config
Respect pkg-config value from environment.
2019-03-10 10:26:42 +00:00
Danilo Spinella
70e29e35f2 Fix PREFIX variable assignement 2019-03-10 10:26:42 +00:00
Tim Schlueter
b821144deb Abort compilation early if pkg-config fails 2019-01-14 00:42:42 -08:00
Tim Schlueter
bdeffdf3c7 Replaced mkdir -p with install -D in make install
Also added a comment about the bcachefs utility to the initramfs hook
2019-01-13 19:31:04 -08:00
Tim Schlueter
079e6ab647 Only run pkg-config once in Makefile, added EXTRA linker vars
* Only run the pkg-config --cflags command once (instead of every .c file)
* Added EXTRA_LDFLAGS and EXTRA_LDLIBS vars
* Removed tabs in the middle of commands to make it easier to manually re-run
  commands manually (e.g. if a compilation fails)
* Replaced `cd dir; git command` in favor of $(shell git -C dir command)
* Minor version format change: dirty trees just append "+" instead of "-dirty"
  and if git describe fails, it now sets the version to "v0.1-nogit"

Also, don't ignore .gitignore files.
2019-01-13 19:31:04 -08:00
Kent Overstreet
c416528eaa snapraid 2018-11-23 02:10:44 -05:00
Tim Schlueter
8418a9f367 Don't add commit id to version when building from a tag 2018-05-27 12:39:05 -07:00
Tim Schlueter
a5d94ce0a8 Added 'version' command to print when the bcachefs tool was built 2018-05-26 14:32:30 -07:00
Kent Overstreet
84e8950cc7 Switch to liblz4 2018-05-17 02:45:49 -04:00
Kent Overstreet
807abf36c1 Update bcachefs sources to e99d29e402 bcachefs: zstd support, compression refactoring 2018-02-16 18:13:24 -05:00
Tim Schlueter
3c85d9f009 Set debian/compat to 10
* Compat level 10 allows parallel builds by default.
	* Also changed debuild to use short arguments.
	* Long arguments weren't supported until dpkg-dev 1.18.8.
2018-02-11 15:32:34 -08:00
Kent Overstreet
813862a47c add -c to cmd_unlock, to check if a device needs to be unlocked 2018-02-11 14:25:33 -05:00
Leah Neukirchen
6c9e9b675c Makefile: default PREFIX to /usr/local 2018-02-09 16:33:26 +01:00
Austin Seipp
997bb216aa build: require explicit include paths for libbcachefs/
This removes the implicit `-I libbcachefs` argument to $(CC), which in turn
requires a set of minor changes throughout the tools. There are two advantages
to this setup:

    1) It is (arguably) easier to read, since the location of bcachefs includes
    are easier to understand at a glance ("where does util.h live?")

    2) It removes the need for a hack to include glibc's copy of
    dirent.h explicitly via '/usr/include/dirent.h', because libbcachefs/
    *also* has a dirent.h file and the compiler cannot disambiguate them.
    This has some ramifications on systems where /usr/include may not
    exist, such as NixOS.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2017-12-10 16:06:01 -06:00
Austin Seipp
04035f0c7e build: use 'find', not 'git', to locate C source code
We will not always have .git available in some cases. For example, if someone
simply downloaded a tarball of the tree, or if we're building with something
like Nix and want to exclude the .git folder, we need to cope and build the
source anyway.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2017-12-10 16:03:32 -06:00
Kent Overstreet
3347339bbd Simple stupid memory reclaim code 2017-11-12 16:48:07 -05:00
Kent Overstreet
8351bbc05b Update bcachefs sources to d4b7ef921a bcachefs: Refactoring 2017-11-08 16:01:26 -09:00
Kent Overstreet
bf8c59996b Update for new superblock options; makefile improvements 2017-10-08 10:25:36 -08:00
Kent Overstreet
e7c2bb91bc Faster crc32c 2017-10-08 10:20:36 -08:00
Kent Overstreet
e0c54d52f5 Workarounds for building with gcc 4 2017-08-23 16:30:25 -06:00
Kent Overstreet
38f22164a9 Update bcachefs sources to 6a25f7a00d bcachefs: fix ioctl code 2017-06-13 17:41:59 -08:00
Kent Overstreet
e57a624feb Update bcachefs sources to 113b475ed2 bcachefs: Better error handling reading bucket prios/gens 2017-05-08 02:26:04 -08:00
Kent Overstreet
f9395eeca5 Update bcachefs sources to 3610542890 bcachefs: Convert to skcipher interface for chacha20 2017-05-05 04:28:45 -08:00
Kent Overstreet
e41920e603 Use aio 2017-04-23 22:05:31 -08:00
Kent Overstreet
819f2dde79 Update bcachefs sources to f026e4e024 2017-04-14 20:40:31 -08:00
Kent Overstreet
978c160405 Fix some clang warnings
the issue in cmd_debug - passing members of struct bpos to kstrtoull,
which aren't aligned - was a legit bug
2017-04-04 06:43:08 -08:00
Kent Overstreet
64c325ef48 Update bcachefs sources to ff95156479 2017-04-04 06:43:08 -08:00
Kent Overstreet
c0ad33c126 bcachefs-in-userspace improvements
Got rid of the stupid shim file hack
2017-03-19 21:39:19 -08:00
Kent Overstreet
5ec39af8ea Rename from bcache-tools to bcachefs-tools 2017-03-19 17:31:47 -08:00
Kent Overstreet
a17f7bcec7 cmd_migrate 2017-03-09 09:14:11 -09:00
Kent Overstreet
171ee48e57 Delete more unused shim code, update bcache code 2017-03-03 23:17:31 -09:00
Kent Overstreet
a5b5eba7f7 New on disk format - encryption 2017-02-28 03:05:38 -09:00
Kent Overstreet
d230eaea61 Add a command to dump filesystem metadata 2017-02-06 23:43:16 -09:00
Kent Overstreet
5933f9478c update bcache code, fsck improvements 2017-02-06 20:45:37 -09:00
Kent Overstreet
b33fc8298f bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
Kent Overstreet
7f4191a202 add support for maximum journal entry size
also rip out prototype crypto support code - real code is in the dev
branch, with the new superblock format
2016-12-11 14:58:27 -09:00
Kent Overstreet
4e158e1553 add dependency generation to make file 2016-10-11 17:50:54 -08:00