Commit Graph

1041 Commits

Author SHA1 Message Date
Kent Overstreet
7f102ee83d Update bcachefs sources to 8fd009dd76 bcachefs: Rip out code for storing backpointers in alloc keys
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-31 18:02:57 -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
Alexander Fougner
eb13ae8d5e Add packaging workflow
Package and publish deb+rpm for easy testing

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-19 19:24:28 +01:00
Kent Overstreet
ec28e6bfa2 Update bcachefs sources to 0342eebf85 bcachefs: Improve the backpointer to missing extent message 2023-03-15 08:59:01 -04:00
Kent Overstreet
fa35853772 Update bcachefs sources to 72405e7ff8 bcachefs: Fix bch2_check_extents_to_backpointers() 2023-03-14 12:56:38 -04:00
Alexander Fougner
46ba4fb48c Add manpage for mount command
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-08 21:00:51 +01:00
Alexander Fougner
84d11b8745 Remove cmd_assemble docs
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-08 21:00:51 +01:00
Kent Overstreet
d1def9a4b1 linux shim: Fix dropped O_DIRECT flag
A recent libbcachefs update accidentally committed a change that dropped
the O_DIRECT flag - we definitely didn't want to do that.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-08 10:30:16 -05: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
Alexander Fougner
ea8adaf1cc Update docs
- add some project info for the main readme
- migrate readmes to markdown for improved formatting
- The main binary now requires the Rust toolchain, so make note of it
  in the build instructions.

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-07 12:46:53 -05:00
Kent Overstreet
ea1b618203 cmd_list.rs: Finish list modes, delete cmd_list.c
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-06 04:13:45 -05:00
Kent Overstreet
0206d42daf Update bcachefs sources to 3856459b1b bcachefs: bch2_btree_iter_peek_node_and_restart()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-06 04:11:50 -05:00
Alexander Fougner
61b25f2dd2 Add rust toolchain to debian build-deps
Fixes building the .deb

- also add missing libudev to debian build deps

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-03-05 05:37:08 -05:00
Kent Overstreet
7709585c2a rust: Implement BtreeNodeIter
This implements BtreeNodeIter, and adds it to cmd_list.rs - the next
step in having a full replacement for cmd_list.c

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-04 23:33:30 -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
9fc4b5d675 rust: Fix ptr casting in Fs::open()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-04 19:14:50 -05:00
Kent Overstreet
1ee7dc7a55 Update bcachefs sources to 2272c5f5b7 bcachefs: Mark stripe buckets with correct data type 2023-03-03 00:39:26 -05:00
Kent Overstreet
d010a21653 linux shim: hlist_unhashed()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-02 23:00:03 -05:00
Kent Overstreet
d5b0d0892a rust: BkeySC now has correct lifetime on BtreeIter
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-03-02 22:01:00 -05:00
Kent Overstreet
8a7e3344fe rust: Filesystem options now supported
This implements opt_set!(), which works exactly the same as the C
version and allows filesystem options to be specified in Rust code.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 06:15:48 -05:00
Kent Overstreet
daebbc085d rust: BtreeTrans lifetime now marked w.r.t. Fs
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 02:28:44 -05:00
Kent Overstreet
b6f30fd188 rust: BkeyValC
Now we have a rust-style enum for key types

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 02:14:40 -05:00
Kent Overstreet
59528398cf rust: BkeySC
Implement a rust equivalent to bkey_s_c, which uses references with the
correct lifetimes: now cmd_list.rs doesn't need unsafe.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 01:01:50 -05:00
Kent Overstreet
a999dc0a9f bcachefs: Annotate BtreeIter with BtreeTrans lifetime
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 00:34:43 -05:00
Kent Overstreet
a8dbc331f0 rust: Simplify bpos FromStr
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 00:33:42 -05:00
Kent Overstreet
a3eb6ad8ef rust: BtreeIterFlags
This adds a new wrapper type for btree iterator flags.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-27 22:15:10 -05:00
Kent Overstreet
5966e59eae Update bcachefs sources to a5da815430 bcachefs: Convert constants to consts 2023-02-27 22:14:56 -05:00
Kent Overstreet
e0e06d95f8 Rust: Start of cmd_list rewrite
This is a _very_ preliminary rewrite of the cmd_list tool in rust, which
is intended to be a testing ground for a safe interface in Rust to the
core btree interface. This adds rust wrappers for:

bch_fs:		provides bch2_fs_open(), bch2_fs_stop
btree_trans:	provides bch2_trans_init(), bch2_trans_exit()
btree_iter:	provides peek, peek_and_restart, advance
bch_errcode:	implements Display (wraps bch2_err_str())
bpos:		implements Ord (wraps bpos_cmp())
bkey_s_c:	implements Display (wraps bch2_bkey_val_to_text())

and other assorted types.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-27 21:45:42 -05:00
Kent Overstreet
30cca2e94d Update bcachefs sources to ca97ee3577 bcachefs: bch2_btree_iter_peek_and_restart_outlined()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-27 21:36:36 -05:00
Daniel Hill
bf359ac1ad nix fix up! Rust now integrated into bcachefs binary
Heavily simplified to just call make with the required rust dependencies.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-02-27 16:39:46 +13:00
Westly Ward
203e40fcf5 Made the -k option for mount.bcachefs default to ask, without messing up formatting
Signed-off-by: Westly Ward <sonicrules1234@gmail.com>
2023-02-22 13:12:59 -07:00
Kent Overstreet
de720eaa24 cmd_list_journal: Highlight entries matching transaction filter
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-21 17:21:18 -05:00
Kent Overstreet
c67ea7b6a1 rust-src: Clean up read_super bindings
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-21 15:58:42 -05:00
Kent Overstreet
f2ab6e552d More rust improvements
- passing of arguments from c -> rust code now works correctly
 - 'bcachefs mount' now handles being passed a device or devices

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-21 14:39:43 -05:00
Kent Overstreet
10c609ac94 fixup! Rust now integrated into bcachefs binary 2023-02-21 03:02:06 -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
da6a356895 Update bcachefs sources to 8e1519ccb6 bcachefs: Add tracepoint & counter for btree split race
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-20 20:03:34 -05:00
Kent Overstreet
46a6b9210c Update bcachefs sources to 1b14994029 bcachefs: Fragmentation LRU 2023-02-17 17:51:22 -05:00
Kent Overstreet
c1677df62e Fix cpu_relax()
cpu_relax() is supposed to be a compiler barrier - this fixes a bug with
btree_write_buffer_flush() getting stuck.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-13 17:51:14 -05:00
Kent Overstreet
1b2d608269 Update bcachefs sources to 8dbfede1d9 fixup! bcachefs: More info on check_bucket_ref() error 2023-02-13 15:51:27 -05:00
Kent Overstreet
4697efb7a0 cmd_list_journal: Add filter options
Instead of having to use grep, this adds the ability to print out only
transactions that update a particular key, or to filter out entirely
keys except those updating certain btrees.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-12 21:44:33 -05:00
Kent Overstreet
e160e9b979 Update bcachefs sources to 3e0c5b0722 fixup! bcachefs: Btree write buffer 2023-02-12 21:41:03 -05:00
Daniel Hill
157ea20eb2 mount: support remount
remount is handled by libc, not the kernel mount procedure, this fixes
remounts. Also sorted the list of flags.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-02-11 13:45:23 +13:00
Kent Overstreet
284c1f5148 Update bcachefs sources to dab31ca168 bcachefs: Add some logging for btree node rewrites due to errors 2023-02-10 15:49:12 -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
Daniel Hill
abe1c3bc8e nix: fix compilation issues
Update Cargo.lock files to match new dependancies
Bump nixpkgs pin
2023-02-02 12:54:04 +13: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
Kent Overstreet
bdd85a6325 cmd_fsck: Add --ratelimit_errors option
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-01 15:43:02 -05:00
Daniel Hill
3c39b422ac fixup! nix: overhaul build system.
Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-01-31 12:10:36 +13:00
Alexander Fougner
8accfdc3c5 rust: replace tracing with logger
tracing framework is a overengineered for simple mount helper. Add a
few very barebone logging macros to allow configurable verbosity and
colorized output with a small footprint.

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-01-18 06:47:46 +01:00