2017-03-17 14:18:50 +08:00
|
|
|
|
|
|
|
obj-$(CONFIG_BCACHEFS_FS) += bcachefs.o
|
|
|
|
|
|
|
|
bcachefs-y := \
|
2023-09-09 06:14:08 +08:00
|
|
|
acl.o \
|
2018-10-06 12:46:55 +08:00
|
|
|
alloc_background.o \
|
|
|
|
alloc_foreground.o \
|
2022-03-18 08:51:27 +08:00
|
|
|
backpointers.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
bkey.o \
|
|
|
|
bkey_methods.o \
|
2018-11-28 07:30:56 +08:00
|
|
|
bkey_sort.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
bset.o \
|
|
|
|
btree_cache.o \
|
|
|
|
btree_gc.o \
|
|
|
|
btree_io.o \
|
|
|
|
btree_iter.o \
|
2023-08-06 04:08:44 +08:00
|
|
|
btree_journal_iter.o \
|
2019-03-08 08:46:10 +08:00
|
|
|
btree_key_cache.o \
|
2022-08-20 03:35:34 +08:00
|
|
|
btree_locking.o \
|
2023-08-06 00:55:08 +08:00
|
|
|
btree_trans_commit.o \
|
|
|
|
btree_update.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
btree_update_interior.o \
|
bcachefs: Btree write buffer
This adds a new method of doing btree updates - a straight write buffer,
implemented as a flat fixed size array.
This is only useful when we don't need to read from the btree in order
to do the update, and when reading is infrequent - perfect for the LRU
btree.
This will make LRU btree updates fast enough that we'll be able to use
it for persistently indexing buckets by fragmentation, which will be a
massive boost to copygc performance.
Changes:
- A new btree_insert_type enum, for btree_insert_entries. Specifies
btree, btree key cache, or btree write buffer.
- bch2_trans_update_buffered(): updates via the btree write buffer
don't need a btree path, so we need a new update path.
- Transaction commit path changes:
The update to the btree write buffer both mutates global, and can
fail if there isn't currently room. Therefore we do all write buffer
updates in the transaction all at once, and also if it fails we have
to revert filesystem usage counter changes.
If there isn't room we flush the write buffer in the transaction
commit error path and retry.
- A new persistent option, for specifying the number of entries in the
write buffer.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-01-04 13:00:50 +08:00
|
|
|
btree_write_buffer.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
buckets.o \
|
2022-01-05 11:32:09 +08:00
|
|
|
buckets_waiting_for_journal.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
chardev.o \
|
|
|
|
checksum.o \
|
|
|
|
clock.o \
|
|
|
|
compress.o \
|
2023-11-09 06:11:44 +08:00
|
|
|
darray.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
debug.o \
|
|
|
|
dirent.o \
|
|
|
|
disk_groups.o \
|
2022-06-14 07:07:19 +08:00
|
|
|
data_update.o \
|
2018-11-02 03:13:19 +08:00
|
|
|
ec.o \
|
2022-07-18 10:31:21 +08:00
|
|
|
errcode.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
error.o \
|
|
|
|
extents.o \
|
2019-11-16 04:52:28 +08:00
|
|
|
extent_update.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
fs.o \
|
2019-10-03 06:35:36 +08:00
|
|
|
fs-common.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
fs-ioctl.o \
|
|
|
|
fs-io.o \
|
2023-08-04 06:18:21 +08:00
|
|
|
fs-io-buffered.o \
|
|
|
|
fs-io-direct.o \
|
|
|
|
fs-io-pagecache.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
fsck.o \
|
|
|
|
inode.o \
|
2023-09-11 06:05:17 +08:00
|
|
|
io_read.o \
|
|
|
|
io_misc.o \
|
|
|
|
io_write.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
journal.o \
|
|
|
|
journal_io.o \
|
|
|
|
journal_reclaim.o \
|
2022-03-11 05:43:52 +08:00
|
|
|
journal_sb.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
journal_seq_blacklist.o \
|
|
|
|
keylist.o \
|
2023-08-28 06:27:41 +08:00
|
|
|
logged_ops.o \
|
2021-12-05 13:31:54 +08:00
|
|
|
lru.o \
|
2022-08-06 10:48:49 +08:00
|
|
|
mean_and_variance.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
migrate.o \
|
|
|
|
move.o \
|
|
|
|
movinggc.o \
|
bcachefs: Nocow support
This adds support for nocow mode, where we do writes in-place when
possible. Patch components:
- New boolean filesystem and inode option, nocow: note that when nocow
is enabled, data checksumming and compression are implicitly disabled
- To prevent in-place writes from racing with data moves
(data_update.c) or bucket reuse (i.e. a bucket being reused and
re-allocated while a nocow write is in flight, we have a new locking
mechanism.
Buckets can be locked for either data update or data move, using a
fixed size hash table of two_state_shared locks. We don't have any
chaining, meaning updates and moves to different buckets that hash to
the same lock will wait unnecessarily - we'll want to watch for this
becoming an issue.
- The allocator path also needs to check for in-place writes in flight
to a given bucket before giving it out: thus we add another counter
to bucket_alloc_state so we can track this.
- Fsync now may need to issue cache flushes to block devices instead of
flushing the journal. We add a device bitmask to bch_inode_info,
ei_devs_need_flush, which tracks devices that need to have flushes
issued - note that this will lead to unnecessary flushes when other
codepaths have already issued flushes, we may want to replace this with
a sequence number.
- New nocow write path: look up extents, and if they're writable write
to them - otherwise fall back to the normal COW write path.
XXX: switch to sequence numbers instead of bitmask for devs needing
journal flush
XXX: ei_quota_lock being a mutex means bch2_nocow_write_done() needs to
run in process context - see if we can improve this
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2022-11-03 05:12:00 +08:00
|
|
|
nocow_locking.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
opts.o \
|
2023-02-04 10:01:40 +08:00
|
|
|
printbuf.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
quota.o \
|
|
|
|
rebalance.o \
|
|
|
|
recovery.o \
|
2019-08-16 21:59:56 +08:00
|
|
|
reflink.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
replicas.o \
|
2023-08-06 03:54:38 +08:00
|
|
|
sb-clean.o \
|
2024-01-21 12:46:35 +08:00
|
|
|
sb-counters.o \
|
2023-12-30 04:25:07 +08:00
|
|
|
sb-downgrade.o \
|
2023-10-26 03:51:16 +08:00
|
|
|
sb-errors.o \
|
2023-08-06 03:40:21 +08:00
|
|
|
sb-members.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
siphash.o \
|
|
|
|
six.o \
|
2023-08-17 04:54:33 +08:00
|
|
|
snapshot.o \
|
2021-03-16 12:42:25 +08:00
|
|
|
subvolume.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
super.o \
|
|
|
|
super-io.o \
|
|
|
|
sysfs.o \
|
|
|
|
tests.o \
|
2024-03-14 08:16:40 +08:00
|
|
|
time_stats.o \
|
2023-12-31 23:04:54 +08:00
|
|
|
thread_with_file.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
trace.o \
|
2022-11-05 01:25:57 +08:00
|
|
|
two_state_shared_lock.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
util.o \
|
2020-11-06 12:39:33 +08:00
|
|
|
varint.o \
|
2017-03-17 14:18:50 +08:00
|
|
|
xattr.o
|
2021-06-06 07:03:16 +08:00
|
|
|
|
2022-08-06 10:48:49 +08:00
|
|
|
obj-$(CONFIG_MEAN_AND_VARIANCE_UNIT_TEST) += mean_and_variance_test.o
|
2024-02-19 15:36:08 +08:00
|
|
|
|
|
|
|
# Silence "note: xyz changed in GCC X.X" messages
|
|
|
|
subdir-ccflags-y += $(call cc-disable-warning, psabi)
|