Commit Graph

1263 Commits

Author SHA1 Message Date
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
Alexander Fougner
20aecb42d8 rust: use rustfmt defaults
follow the kernel style guide, i.e idiomatic rust style.

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-01-16 09:24:01 +01:00
Alexander Fougner
bdc290eee0 rust: suppress errors on fs probing
suppress errors for any non-bchfs blockdevs found during probing

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-01-15 22:20:16 +01:00
Alexander Fougner
87243efa5c rust: support fstab style mount
- add support for fstab format, UUID=<uuid>

- structopt is no longer actively maintained, replace with clap v4
  which support everything structopt can and more.

- update dependencies

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-01-15 22:20:13 +01: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
Daniel Hill
9a44c6d4d0 nix: overhaul build system.
Removed outdated overlay.
Simply build tooling using bingenHook and propagated*Inputs

Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-01-03 16:58:55 +13:00
Daniel Hill
9d6040c8b6 rust: update bindgen to 0.63
Signed-off-by: Daniel Hill <daniel@gluo.nz>
2023-01-03 16:58:55 +13:00
Kent Overstreet
42cf74fd1d Merge https://github.com/fougner/bcachefs-tools 2022-12-29 12:31:29 -05:00
Alexander Fougner
d69daae411 doc: fix formatting
fix misnomer and some formatting

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2022-12-29 18:06:16 +01:00
Kent Overstreet
0417560649 Get current metadata version from sysfs
This changes the default version for the format command to be the
currently supported version, via
/sys/modules/bcachefs/parameters/version.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-12-21 21:41:34 -05:00
Kent Overstreet
e314b39c63 Update bcachefs sources to 0939e1c732 fixup! bcachefs: Rework lru btree 2022-12-19 22:24:41 -05:00
Kent Overstreet
177f05106c Update bcachefs sources to 2e8463c770 bcachefs: Rework lru btree 2022-12-19 18:31:44 -05:00
Kent Overstreet
b6fca67693 Update bcachefs sources to c801fa69f0 bcachefs: Fix bch_alloc_to_text() 2022-12-19 16:06:33 -05:00
Kent Overstreet
1eae1d718c Use bch2_err_str() instead of strerror()
This correctly prints out our private error codes.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-12-19 16:05:54 -05:00
Kent Overstreet
e2670a38d1 Change memory reclaim
- Spin up a background thread to call the shrinkers every 1 second
 - Memory allocations will only call reclaim after a failed allocation,
   not every single time

This will be a major performance boost on allocation intensive
workloads.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-12-19 14:47:42 -05:00
Kent Overstreet
7111177169 Update bcachefs sources to 7958ebe324 bcachefs: Fix alloc_v4_backpointers() 2022-12-19 14:47:35 -05:00
Kent Overstreet
3c0484687d Update bcachefs sources to 84505cfd37 bcachefs: Go RW before check_alloc_info() 2022-12-13 18:27:31 -05:00
Kent Overstreet
a06dee6da2 Update bcachefs sources to ed2a5f4260 bcachefs: Add a missing bch2_btree_path_traverse() call 2022-12-09 16:40:07 -05:00
Kent Overstreet
787768043d Update bcachefs sources to de3b30303e bcachefs: bucket_gens btree 2022-12-02 21:55:01 -05:00
Kent Overstreet
3867739e56 Update bcachefs sources to be2d60d948 bcachefs: New magic number 2022-12-02 19:48:23 -05:00
Kent Overstreet
f82cd58008 Update bcachefs sources to f1c9030ccb bcachefs: Don't error out when just reading the journal 2022-12-01 11:20:40 -05:00
Kent Overstreet
0c98cd7bf6 Update bcachefs sources to eabde7cb37 fixup! bcachefs: Optimize bch2_alloc_to_v4() 2022-11-30 10:41:00 -05:00
Kent Overstreet
5a5a6c25a9 Update bcachefs sources to 8a65cc4951 bcachefs: Improve bch2_dev_freespace_init() 2022-11-29 01:15:08 -05:00
Kent Overstreet
934a84dfaf Update bcachefs sources to 5963d1b1a4 bcacehfs: Fix bch2_get_alloc_in_memory_pos() 2022-11-26 17:09:59 -05:00
Stijn Tintel
48eefee749 Fix build against musl libc.
The musl C library does not define __attribute_const__. Add it to
include/linux/compiler.h with a guard to fix build against musl libc.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-11-24 06:21:06 +02:00
Kent Overstreet
f1f88825c3 Update bcachefs sources to ea47add37d bcachefs: More errcode cleanup 2022-11-20 00:15:11 -05:00
Kent Overstreet
7e0fbb0144 Update bcachefs sources to ed88ebf18c bcachefs: Handle last journal write being torn 2022-11-19 21:45:00 -05:00
Kent Overstreet
505230a110 Update bcachefs sources to 586e7c5498 bcachefs: Improve journal_read() logging 2022-11-19 21:29:01 -05:00
Kent Overstreet
effa4c9432 rust-src: cargo update
Update locked dependencies

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-11-19 19:00:25 -05:00