Commit Graph

1003 Commits

Author SHA1 Message Date
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
Kent Overstreet
36db254cec linux/blkdev.c: Fall back to buffered IO when O_DIRECT fails
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-11-19 18:59:55 -05:00
Kent Overstreet
7e196f5399 Update bcachefs sources to 4366ca365f fixup! bcachefs: Btree split improvement 2022-11-18 18:23:28 -05:00
Kent Overstreet
c1f55a60c4 Update bcachefs sources to 6406e05835 bcachefs: Nocow support 2022-11-18 18:21:11 -05:00
Kent Overstreet
e4716b10ed cmd_migrate: Fix for write completion change
bch_write no longer delivers completions via op->cl - this patch changes
to use BCH_WRITE_SYNC.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-11-16 00:03:36 -05: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
e2442e57f2 cmd_kill_btree_node.c
This factors out cmd_kill_btree_node into its own file - it was in
cmd_list_journal.c, which wsa rather silly.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-11-13 20:09:40 -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
980f7437e2 Update bcachefs sources to 61ebcb532a bcachefs: Fix for allocating before backpointers have been checked 2022-10-24 11:34:07 -04:00
Kent Overstreet
ae43a58d97 Update bcachefs sources to 70fa0c1ff4 fixup! bcachefs: Btree key cache improvements 2022-10-23 18:24:08 -04:00