2017-03-17 06:18:50 +00:00
|
|
|
|
|
|
|
obj-$(CONFIG_BCACHEFS_FS) += bcachefs.o
|
|
|
|
|
|
|
|
bcachefs-y := \
|
2023-09-08 22:14:08 +00:00
|
|
|
acl.o \
|
2018-10-06 04:46:55 +00:00
|
|
|
alloc_background.o \
|
|
|
|
alloc_foreground.o \
|
2022-03-18 00:51:27 +00:00
|
|
|
backpointers.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
bkey.o \
|
|
|
|
bkey_methods.o \
|
2018-11-27 23:30:56 +00:00
|
|
|
bkey_sort.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
bset.o \
|
|
|
|
btree_cache.o \
|
|
|
|
btree_gc.o \
|
|
|
|
btree_io.o \
|
|
|
|
btree_iter.o \
|
2023-08-05 20:08:44 +00:00
|
|
|
btree_journal_iter.o \
|
2019-03-08 00:46:10 +00:00
|
|
|
btree_key_cache.o \
|
2022-08-19 19:35:34 +00:00
|
|
|
btree_locking.o \
|
2023-08-05 16:55:08 +00:00
|
|
|
btree_trans_commit.o \
|
|
|
|
btree_update.o \
|
2017-03-17 06:18:50 +00: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 05:00:50 +00:00
|
|
|
btree_write_buffer.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
buckets.o \
|
2022-01-05 03:32:09 +00:00
|
|
|
buckets_waiting_for_journal.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
chardev.o \
|
|
|
|
checksum.o \
|
|
|
|
clock.o \
|
|
|
|
compress.o \
|
2023-11-08 22:11:44 +00:00
|
|
|
darray.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
debug.o \
|
|
|
|
dirent.o \
|
|
|
|
disk_groups.o \
|
2022-06-13 23:07:19 +00:00
|
|
|
data_update.o \
|
2018-11-01 19:13:19 +00:00
|
|
|
ec.o \
|
2022-07-18 02:31:21 +00:00
|
|
|
errcode.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
error.o \
|
|
|
|
extents.o \
|
2019-11-15 20:52:28 +00:00
|
|
|
extent_update.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
fs.o \
|
2019-10-02 22:35:36 +00:00
|
|
|
fs-common.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
fs-ioctl.o \
|
|
|
|
fs-io.o \
|
2023-08-03 22:18:21 +00:00
|
|
|
fs-io-buffered.o \
|
|
|
|
fs-io-direct.o \
|
|
|
|
fs-io-pagecache.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
fsck.o \
|
|
|
|
inode.o \
|
2023-09-10 22:05:17 +00:00
|
|
|
io_read.o \
|
|
|
|
io_misc.o \
|
|
|
|
io_write.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
journal.o \
|
|
|
|
journal_io.o \
|
|
|
|
journal_reclaim.o \
|
2022-03-10 21:43:52 +00:00
|
|
|
journal_sb.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
journal_seq_blacklist.o \
|
|
|
|
keylist.o \
|
2023-08-27 22:27:41 +00:00
|
|
|
logged_ops.o \
|
2021-12-05 05:31:54 +00:00
|
|
|
lru.o \
|
2022-08-06 02:48:49 +00:00
|
|
|
mean_and_variance.o \
|
2017-03-17 06:18:50 +00: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-02 21:12:00 +00:00
|
|
|
nocow_locking.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
opts.o \
|
2023-02-04 02:01:40 +00:00
|
|
|
printbuf.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
quota.o \
|
|
|
|
rebalance.o \
|
|
|
|
recovery.o \
|
2019-08-16 13:59:56 +00:00
|
|
|
reflink.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
replicas.o \
|
2023-08-05 19:54:38 +00:00
|
|
|
sb-clean.o \
|
2024-01-21 04:46:35 +00:00
|
|
|
sb-counters.o \
|
2023-12-29 20:25:07 +00:00
|
|
|
sb-downgrade.o \
|
2023-10-25 19:51:16 +00:00
|
|
|
sb-errors.o \
|
2023-08-05 19:40:21 +00:00
|
|
|
sb-members.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
siphash.o \
|
|
|
|
six.o \
|
2023-08-16 20:54:33 +00:00
|
|
|
snapshot.o \
|
2021-03-16 04:42:25 +00:00
|
|
|
subvolume.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
super.o \
|
|
|
|
super-io.o \
|
|
|
|
sysfs.o \
|
|
|
|
tests.o \
|
2023-12-31 15:04:54 +00:00
|
|
|
thread_with_file.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
trace.o \
|
2022-11-04 17:25:57 +00:00
|
|
|
two_state_shared_lock.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
util.o \
|
2020-11-06 04:39:33 +00:00
|
|
|
varint.o \
|
2017-03-17 06:18:50 +00:00
|
|
|
xattr.o
|
2021-06-05 23:03:16 +00:00
|
|
|
|
2022-08-06 02:48:49 +00:00
|
|
|
obj-$(CONFIG_MEAN_AND_VARIANCE_UNIT_TEST) += mean_and_variance_test.o
|