Skip to content

Commit 999a36b

Browse files
committed
Merge tag 'bcachefs-2024-01-10' of https://evilpiepirate.org/git/bcachefs
Pull bcachefs updates from Kent Overstreet: - btree write buffer rewrite: instead of adding keys to the btree write buffer at transaction commit time, we now journal them with a different journal entry type and copy them from the journal to the write buffer just prior to journal write. This reduces the number of atomic operations on shared cachelines in the transaction commit path and is a signicant performance improvement on some workloads: multithreaded 4k random writes went from ~650k iops to ~850k iops. - Bring back optimistic spinning for six locks: the new implementation doesn't use osq locks; instead we add to the lock waitlist as normal, and then spin on the lock_acquired bit in the waitlist entry, _not_ the lock itself. - New ioctls: - BCH_IOCTL_DEV_USAGE_V2, which allows for new data types - BCH_IOCTL_OFFLINE_FSCK, which runs the kernel implementation of fsck but without mounting: useful for transparently using the kernel version of fsck from 'bcachefs fsck' when the kernel version is a better match for the on disk filesystem. - BCH_IOCTL_ONLINE_FSCK: online fsck. Not all passes are supported yet, but the passes that are supported are fully featured - errors may be corrected as normal. The new ioctls use the new 'thread_with_file' abstraction for kicking off a kthread that's tied to a file descriptor returned to userspace via the ioctl. - btree_paths within a btree_trans are now dynamically growable, instead of being limited to 64. This is important for the check_directory_structure phase of fsck, and also fixes some issues we were having with btree path overflow in the reflink btree. - Trigger refactoring; prep work for the upcoming disk space accounting rewrite - Numerous bugfixes :) * tag 'bcachefs-2024-01-10' of https://evilpiepirate.org/git/bcachefs: (226 commits) bcachefs: eytzinger0_find() search should be const bcachefs: move "ptrs not changing" optimization to bch2_trigger_extent() bcachefs: fix simulateously upgrading & downgrading bcachefs: Restart recovery passes more reliably bcachefs: bch2_dump_bset() doesn't choke on u64s == 0 bcachefs: improve checksum error messages bcachefs: improve validate_bset_keys() bcachefs: print sb magic when relevant bcachefs: __bch2_sb_field_to_text() bcachefs: %pg is banished bcachefs: Improve would_deadlock trace event bcachefs: fsck_err()s don't need to manually check c->sb.version anymore bcachefs: Upgrades now specify errors to fix, like downgrades bcachefs: no thread_with_file in userspace bcachefs: Don't autofix errors we can't fix bcachefs: add missing bch2_latency_acct() call bcachefs: increase max_active on io_complete_wq bcachefs: add time_stats for btree_node_read_done() bcachefs: don't clear accessed bit in btree node fill bcachefs: Add an option to control btree node prefetching ...
2 parents 84e9a2d + 169de41 commit 999a36b

125 files changed

Lines changed: 7101 additions & 5961 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3502,7 +3502,7 @@ F: drivers/net/hamradio/baycom*
35023502

35033503
BCACHE (BLOCK LAYER CACHE)
35043504
M: Coly Li <colyli@suse.de>
3505-
M: Kent Overstreet <kent.overstreet@gmail.com>
3505+
M: Kent Overstreet <kent.overstreet@linux.dev>
35063506
L: linux-bcache@vger.kernel.org
35073507
S: Maintained
35083508
W: http://bcache.evilpiepirate.org

arch/powerpc/kernel/firmware.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ EXPORT_SYMBOL_GPL(powerpc_firmware_features);
2323

2424
#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_KVM_GUEST)
2525
DEFINE_STATIC_KEY_FALSE(kvm_guest);
26+
EXPORT_SYMBOL_GPL(kvm_guest);
27+
2628
int __init check_kvm_guest(void)
2729
{
2830
struct device_node *hyper_node;

fs/bcachefs/Kconfig

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ config BCACHEFS_POSIX_ACL
5050
depends on BCACHEFS_FS
5151
select FS_POSIX_ACL
5252

53-
config BCACHEFS_DEBUG_TRANSACTIONS
54-
bool "bcachefs runtime info"
55-
depends on BCACHEFS_FS
56-
help
57-
This makes the list of running btree transactions available in debugfs.
58-
59-
This is a highly useful debugging feature but does add a small amount of overhead.
60-
6153
config BCACHEFS_DEBUG
6254
bool "bcachefs debugging"
6355
depends on BCACHEFS_FS
@@ -85,6 +77,16 @@ config BCACHEFS_NO_LATENCY_ACCT
8577
help
8678
This disables device latency tracking and time stats, only for performance testing
8779

80+
config BCACHEFS_SIX_OPTIMISTIC_SPIN
81+
bool "Optimistic spinning for six locks"
82+
depends on BCACHEFS_FS
83+
depends on SMP
84+
default y
85+
help
86+
Instead of immediately sleeping when attempting to take a six lock that
87+
is held by another thread, spin for a short while, as long as the
88+
thread owning the lock is running.
89+
8890
config MEAN_AND_VARIANCE_UNIT_TEST
8991
tristate "mean_and_variance unit tests" if !KUNIT_ALL_TESTS
9092
depends on KUNIT

fs/bcachefs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ bcachefs-y := \
8282
super-io.o \
8383
sysfs.o \
8484
tests.o \
85+
thread_with_file.o \
8586
trace.o \
8687
two_state_shared_lock.o \
8788
util.o \

0 commit comments

Comments
 (0)