mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
a8b3a677e7
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>
77 lines
1.3 KiB
Makefile
77 lines
1.3 KiB
Makefile
|
|
obj-$(CONFIG_BCACHEFS_FS) += bcachefs.o
|
|
|
|
bcachefs-y := \
|
|
alloc_background.o \
|
|
alloc_foreground.o \
|
|
backpointers.o \
|
|
bkey.o \
|
|
bkey_methods.o \
|
|
bkey_sort.o \
|
|
bset.o \
|
|
btree_cache.o \
|
|
btree_gc.o \
|
|
btree_io.o \
|
|
btree_iter.o \
|
|
btree_key_cache.o \
|
|
btree_locking.o \
|
|
btree_update_interior.o \
|
|
btree_update_leaf.o \
|
|
btree_write_buffer.o \
|
|
buckets.o \
|
|
buckets_waiting_for_journal.o \
|
|
chardev.o \
|
|
checksum.o \
|
|
clock.o \
|
|
compress.o \
|
|
counters.o \
|
|
debug.o \
|
|
dirent.o \
|
|
disk_groups.o \
|
|
data_update.o \
|
|
ec.o \
|
|
errcode.o \
|
|
error.o \
|
|
extents.o \
|
|
extent_update.o \
|
|
fs.o \
|
|
fs-common.o \
|
|
fs-ioctl.o \
|
|
fs-io.o \
|
|
fsck.o \
|
|
inode.o \
|
|
io.o \
|
|
journal.o \
|
|
journal_io.o \
|
|
journal_reclaim.o \
|
|
journal_sb.o \
|
|
journal_seq_blacklist.o \
|
|
keylist.o \
|
|
lru.o \
|
|
mean_and_variance.o \
|
|
migrate.o \
|
|
move.o \
|
|
movinggc.o \
|
|
nocow_locking.o \
|
|
opts.o \
|
|
printbuf.o \
|
|
quota.o \
|
|
rebalance.o \
|
|
recovery.o \
|
|
reflink.o \
|
|
replicas.o \
|
|
siphash.o \
|
|
six.o \
|
|
subvolume.o \
|
|
super.o \
|
|
super-io.o \
|
|
sysfs.o \
|
|
tests.o \
|
|
trace.o \
|
|
two_state_shared_lock.o \
|
|
util.o \
|
|
varint.o \
|
|
xattr.o
|
|
|
|
bcachefs-$(CONFIG_BCACHEFS_POSIX_ACL) += acl.o
|
|
obj-$(CONFIG_MEAN_AND_VARIANCE_UNIT_TEST) += mean_and_variance_test.o
|