Skip to content

Commit 9e87705

Browse files
committed
Merge tag 'bcachefs-2023-10-30' of https://evilpiepirate.org/git/bcachefs
Pull initial bcachefs updates from Kent Overstreet: "Here's the bcachefs filesystem pull request. One new patch since last week: the exportfs constants ended up conflicting with other filesystems that are also getting added to the global enum, so switched to new constants picked by Amir. The only new non fs/bcachefs/ patch is the objtool patch that adds bcachefs functions to the list of noreturns. The patch that exports osq_lock() has been dropped for now, per Ingo" * tag 'bcachefs-2023-10-30' of https://evilpiepirate.org/git/bcachefs: (2781 commits) exportfs: Change bcachefs fid_type enum to avoid conflicts bcachefs: Refactor memcpy into direct assignment bcachefs: Fix drop_alloc_keys() bcachefs: snapshot_create_lock bcachefs: Fix snapshot skiplists during snapshot deletion bcachefs: bch2_sb_field_get() refactoring bcachefs: KEY_TYPE_error now counts towards i_sectors bcachefs: Fix handling of unknown bkey types bcachefs: Switch to unsafe_memcpy() in a few places bcachefs: Use struct_size() bcachefs: Correctly initialize new buckets on device resize bcachefs: Fix another smatch complaint bcachefs: Use strsep() in split_devs() bcachefs: Add iops fields to bch_member bcachefs: Rename bch_sb_field_members -> bch_sb_field_members_v1 bcachefs: New superblock section members_v2 bcachefs: Add new helper to retrieve bch_member from sb bcachefs: bucket_lock() is now a sleepable lock bcachefs: fix crc32c checksum merge byte order problem bcachefs: Fix bch2_inode_delete_keys() ...
2 parents d5acbc6 + b827ac4 commit 9e87705

File tree

223 files changed

+95037
-56
lines changed

Some content is hidden

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

223 files changed

+95037
-56
lines changed

MAINTAINERS

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,6 +3482,14 @@ W: http://bcache.evilpiepirate.org
34823482
C: irc://irc.oftc.net/bcache
34833483
F: drivers/md/bcache/
34843484

3485+
BCACHEFS
3486+
M: Kent Overstreet <[email protected]>
3487+
R: Brian Foster <[email protected]>
3488+
3489+
S: Supported
3490+
C: irc://irc.oftc.net/bcache
3491+
F: fs/bcachefs/
3492+
34853493
BDISP ST MEDIA DRIVER
34863494
M: Fabien Dessenne <[email protected]>
34873495
@@ -5068,6 +5076,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
50685076
F: Documentation/devicetree/bindings/timer/
50695077
F: drivers/clocksource/
50705078

5079+
CLOSURES
5080+
M: Kent Overstreet <[email protected]>
5081+
5082+
S: Supported
5083+
C: irc://irc.oftc.net/bcache
5084+
F: include/linux/closure.h
5085+
F: lib/closure.c
5086+
50715087
CMPC ACPI DRIVER
50725088
M: Thadeu Lima de Souza Cascardo <[email protected]>
50735089
M: Daniel Oliveira Nascimento <[email protected]>
@@ -8748,6 +8764,13 @@ S: Supported
87488764
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
87498765
F: drivers/pmdomain/
87508766

8767+
GENERIC RADIX TREE
8768+
M: Kent Overstreet <[email protected]>
8769+
S: Supported
8770+
C: irc://irc.oftc.net/bcache
8771+
F: include/linux/generic-radix-tree.h
8772+
F: lib/generic-radix-tree.c
8773+
87518774
GENERIC RESISTIVE TOUCHSCREEN ADC DRIVER
87528775
M: Eugen Hristev <[email protected]>
87538776

drivers/md/bcache/Kconfig

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ config BCACHE
44
tristate "Block device as cache"
55
select BLOCK_HOLDER_DEPRECATED if SYSFS
66
select CRC64
7+
select CLOSURES
78
help
89
Allows a block device to be used as cache for other devices; uses
910
a btree for indexing and the layout is optimized for SSDs.
@@ -19,15 +20,6 @@ config BCACHE_DEBUG
1920
Enables extra debugging tools, allows expensive runtime checks to be
2021
turned on.
2122

22-
config BCACHE_CLOSURES_DEBUG
23-
bool "Debug closures"
24-
depends on BCACHE
25-
select DEBUG_FS
26-
help
27-
Keeps all active closures in a linked list and provides a debugfs
28-
interface to list them, which makes it possible to see asynchronous
29-
operations that get stuck.
30-
3123
config BCACHE_ASYNC_REGISTRATION
3224
bool "Asynchronous device registration"
3325
depends on BCACHE

drivers/md/bcache/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
obj-$(CONFIG_BCACHE) += bcache.o
44

5-
bcache-y := alloc.o bset.o btree.o closure.o debug.o extents.o\
6-
io.o journal.o movinggc.o request.o stats.o super.o sysfs.o trace.o\
5+
bcache-y := alloc.o bset.o btree.o debug.o extents.o io.o\
6+
journal.o movinggc.o request.o stats.o super.o sysfs.o trace.o\
77
util.o writeback.o features.o

drivers/md/bcache/bcache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
#define pr_fmt(fmt) "bcache: %s() " fmt, __func__
180180

181181
#include <linux/bio.h>
182+
#include <linux/closure.h>
182183
#include <linux/kobject.h>
183184
#include <linux/list.h>
184185
#include <linux/mutex.h>
@@ -192,7 +193,6 @@
192193
#include "bcache_ondisk.h"
193194
#include "bset.h"
194195
#include "util.h"
195-
#include "closure.h"
196196

197197
struct bucket {
198198
atomic_t pin;

drivers/md/bcache/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2906,7 +2906,6 @@ static int __init bcache_init(void)
29062906
goto err;
29072907

29082908
bch_debug_init();
2909-
closure_debug_init();
29102909

29112910
bcache_is_reboot = false;
29122911

drivers/md/bcache/util.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#define _BCACHE_UTIL_H
55

66
#include <linux/blkdev.h>
7+
#include <linux/closure.h>
78
#include <linux/errno.h>
89
#include <linux/kernel.h>
910
#include <linux/sched/clock.h>
@@ -13,8 +14,6 @@
1314
#include <linux/workqueue.h>
1415
#include <linux/crc64.h>
1516

16-
#include "closure.h"
17-
1817
struct closure;
1918

2019
#ifdef CONFIG_BCACHE_DEBUG

fs/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ source "fs/ocfs2/Kconfig"
4848
source "fs/btrfs/Kconfig"
4949
source "fs/nilfs2/Kconfig"
5050
source "fs/f2fs/Kconfig"
51+
source "fs/bcachefs/Kconfig"
5152
source "fs/zonefs/Kconfig"
5253

5354
endif # BLOCK

fs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ obj-$(CONFIG_OCFS2_FS) += ocfs2/
123123
obj-$(CONFIG_BTRFS_FS) += btrfs/
124124
obj-$(CONFIG_GFS2_FS) += gfs2/
125125
obj-$(CONFIG_F2FS_FS) += f2fs/
126+
obj-$(CONFIG_BCACHEFS_FS) += bcachefs/
126127
obj-$(CONFIG_CEPH_FS) += ceph/
127128
obj-$(CONFIG_PSTORE) += pstore/
128129
obj-$(CONFIG_EFIVAR_FS) += efivarfs/

fs/bcachefs/Kconfig

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
config BCACHEFS_FS
3+
tristate "bcachefs filesystem support (EXPERIMENTAL)"
4+
depends on BLOCK
5+
select EXPORTFS
6+
select CLOSURES
7+
select LIBCRC32C
8+
select CRC64
9+
select FS_POSIX_ACL
10+
select LZ4_COMPRESS
11+
select LZ4_DECOMPRESS
12+
select LZ4HC_COMPRESS
13+
select LZ4HC_DECOMPRESS
14+
select ZLIB_DEFLATE
15+
select ZLIB_INFLATE
16+
select ZSTD_COMPRESS
17+
select ZSTD_DECOMPRESS
18+
select CRYPTO_SHA256
19+
select CRYPTO_CHACHA20
20+
select CRYPTO_POLY1305
21+
select KEYS
22+
select RAID6_PQ
23+
select XOR_BLOCKS
24+
select XXHASH
25+
select SRCU
26+
select SYMBOLIC_ERRNAME
27+
select MEAN_AND_VARIANCE
28+
help
29+
The bcachefs filesystem - a modern, copy on write filesystem, with
30+
support for multiple devices, compression, checksumming, etc.
31+
32+
config BCACHEFS_QUOTA
33+
bool "bcachefs quota support"
34+
depends on BCACHEFS_FS
35+
select QUOTACTL
36+
37+
config BCACHEFS_POSIX_ACL
38+
bool "bcachefs POSIX ACL support"
39+
depends on BCACHEFS_FS
40+
select FS_POSIX_ACL
41+
42+
config BCACHEFS_DEBUG_TRANSACTIONS
43+
bool "bcachefs runtime info"
44+
depends on BCACHEFS_FS
45+
default y
46+
help
47+
This makes the list of running btree transactions available in debugfs.
48+
49+
This is a highly useful debugging feature but does add a small amount of overhead.
50+
51+
config BCACHEFS_DEBUG
52+
bool "bcachefs debugging"
53+
depends on BCACHEFS_FS
54+
help
55+
Enables many extra debugging checks and assertions.
56+
57+
The resulting code will be significantly slower than normal; you
58+
probably shouldn't select this option unless you're a developer.
59+
60+
config BCACHEFS_TESTS
61+
bool "bcachefs unit and performance tests"
62+
depends on BCACHEFS_FS
63+
help
64+
Include some unit and performance tests for the core btree code
65+
66+
config BCACHEFS_LOCK_TIME_STATS
67+
bool "bcachefs lock time statistics"
68+
depends on BCACHEFS_FS
69+
help
70+
Expose statistics for how long we held a lock in debugfs
71+
72+
config BCACHEFS_NO_LATENCY_ACCT
73+
bool "disable latency accounting and time stats"
74+
depends on BCACHEFS_FS
75+
help
76+
This disables device latency tracking and time stats, only for performance testing
77+
78+
config MEAN_AND_VARIANCE_UNIT_TEST
79+
tristate "mean_and_variance unit tests" if !KUNIT_ALL_TESTS
80+
depends on KUNIT
81+
select MEAN_AND_VARIANCE
82+
default KUNIT_ALL_TESTS
83+
help
84+
This option enables the kunit tests for mean_and_variance module.
85+
If unsure, say N.

fs/bcachefs/Makefile

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
2+
obj-$(CONFIG_BCACHEFS_FS) += bcachefs.o
3+
4+
bcachefs-y := \
5+
acl.o \
6+
alloc_background.o \
7+
alloc_foreground.o \
8+
backpointers.o \
9+
bkey.o \
10+
bkey_methods.o \
11+
bkey_sort.o \
12+
bset.o \
13+
btree_cache.o \
14+
btree_gc.o \
15+
btree_io.o \
16+
btree_iter.o \
17+
btree_journal_iter.o \
18+
btree_key_cache.o \
19+
btree_locking.o \
20+
btree_trans_commit.o \
21+
btree_update.o \
22+
btree_update_interior.o \
23+
btree_write_buffer.o \
24+
buckets.o \
25+
buckets_waiting_for_journal.o \
26+
chardev.o \
27+
checksum.o \
28+
clock.o \
29+
compress.o \
30+
counters.o \
31+
debug.o \
32+
dirent.o \
33+
disk_groups.o \
34+
data_update.o \
35+
ec.o \
36+
errcode.o \
37+
error.o \
38+
extents.o \
39+
extent_update.o \
40+
fs.o \
41+
fs-common.o \
42+
fs-ioctl.o \
43+
fs-io.o \
44+
fs-io-buffered.o \
45+
fs-io-direct.o \
46+
fs-io-pagecache.o \
47+
fsck.o \
48+
inode.o \
49+
io_read.o \
50+
io_misc.o \
51+
io_write.o \
52+
journal.o \
53+
journal_io.o \
54+
journal_reclaim.o \
55+
journal_sb.o \
56+
journal_seq_blacklist.o \
57+
keylist.o \
58+
logged_ops.o \
59+
lru.o \
60+
mean_and_variance.o \
61+
migrate.o \
62+
move.o \
63+
movinggc.o \
64+
nocow_locking.o \
65+
opts.o \
66+
printbuf.o \
67+
quota.o \
68+
rebalance.o \
69+
recovery.o \
70+
reflink.o \
71+
replicas.o \
72+
sb-clean.o \
73+
sb-members.o \
74+
siphash.o \
75+
six.o \
76+
snapshot.o \
77+
subvolume.o \
78+
super.o \
79+
super-io.o \
80+
sysfs.o \
81+
tests.o \
82+
trace.o \
83+
two_state_shared_lock.o \
84+
util.o \
85+
varint.o \
86+
xattr.o
87+
88+
obj-$(CONFIG_MEAN_AND_VARIANCE_UNIT_TEST) += mean_and_variance_test.o

0 commit comments

Comments
 (0)