linux/fs/bcachefs
Kent Overstreet e3e464ac6d bcachefs: Move extent overwrite handling out of core btree code
Ever since the btree code was first written, handling of overwriting
existing extents - including partially overwriting and splittin existing
extents - was handled as part of the core btree insert path. The modern
transaction and iterator infrastructure didn't exist then, so that was
the only way for it to be done.

This patch moves that outside of the core btree code to a pass that runs
at transaction commit time.

This is a significant simplification to the btree code and overall
reduction in code size, but more importantly it gets us much closer to
the core btree code being completely independent of extents and is
important prep work for snapshots.

This introduces a new feature bit; the old and new extent update models
are incompatible when the filesystem needs journal replay.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-22 17:08:36 -04:00
..
acl.c bcachefs: Split out btree_trigger_flags 2023-10-22 17:08:33 -04:00
acl.h
alloc_background.c bcachefs: btree_and_journal_iter 2023-10-22 17:08:35 -04:00
alloc_background.h bcachefs: Refactor bch2_alloc_write() 2023-10-22 17:08:26 -04:00
alloc_foreground.c bcachefs: Drop unused arg to bch2_open_buckets_stop_dev() 2023-10-22 17:08:27 -04:00
alloc_foreground.h bcachefs: Drop unused arg to bch2_open_buckets_stop_dev() 2023-10-22 17:08:27 -04:00
alloc_types.h bcachefs: Fix some reserve calculations 2023-10-22 17:08:14 -04:00
bcachefs_format.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
bcachefs_ioctl.h bcachefs: Redo filesystem usage ioctls 2023-10-22 17:08:33 -04:00
bcachefs.h bcachefs: Seralize btree_update operations at btree_update_nodes_written() 2023-10-22 17:08:35 -04:00
bkey_methods.c bcachefs: Fix bch2_ptr_swab for indirect extents 2023-10-22 17:08:35 -04:00
bkey_methods.h bcachefs: Fix bch2_ptr_swab for indirect extents 2023-10-22 17:08:35 -04:00
bkey_on_stack.h bcachefs: bkey_on_stack_reassemble() 2023-10-22 17:08:32 -04:00
bkey_sort.c bcachefs: Fix extent_sort_fix_overlapping() 2023-10-22 17:08:36 -04:00
bkey_sort.h bcachefs: Kill btree_node_iter_large 2023-10-22 17:08:32 -04:00
bkey.c bcachefs: Make __bch2_bkey_cmp_packed() smaller 2023-10-22 17:08:31 -04:00
bkey.h bcachefs: btree_ptr_v2 2023-10-22 17:08:35 -04:00
bset.c bcachefs: Iterator debug code improvements 2023-10-22 17:08:36 -04:00
bset.h bcachefs: Fix bch2_sort_keys() to not modify src keys 2023-10-22 17:08:34 -04:00
btree_cache.c bcachefs: fix setting btree_node_accessed() 2023-10-22 17:08:35 -04:00
btree_cache.h bcachefs: Use btree_ptr_v2.mem_ptr to avoid hash table lookup 2023-10-22 17:08:35 -04:00
btree_gc.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
btree_gc.h bcachefs: btree_bkey_cached_common 2023-10-22 17:08:21 -04:00
btree_io.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
btree_io.h bcachefs: Refactor whiteouts compaction 2023-10-22 17:08:32 -04:00
btree_iter.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
btree_iter.h bcachefs: btree_iter_peek_with_updates() 2023-10-22 17:08:36 -04:00
btree_locking.h bcachefs: Inline more of bch2_trans_commit hot path 2023-10-22 17:08:30 -04:00
btree_types.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
btree_update_interior.c bcachefs: Iterator debug code improvements 2023-10-22 17:08:36 -04:00
btree_update_interior.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
btree_update_leaf.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
btree_update.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
buckets_types.h bcachefs: Make replicas_delta_list smaller 2023-10-22 17:08:30 -04:00
buckets.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
buckets.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
chardev.c bcachefs: Redo filesystem usage ioctls 2023-10-22 17:08:33 -04:00
chardev.h
checksum.c bcachefs: Track incompressible data 2023-10-22 17:08:34 -04:00
checksum.h bcachefs: Track incompressible data 2023-10-22 17:08:34 -04:00
clock_types.h bcachefs: Make io timers less buggy 2023-10-22 17:08:33 -04:00
clock.c bcachefs: Make io timers less buggy 2023-10-22 17:08:33 -04:00
clock.h bcachefs: Make io timers less buggy 2023-10-22 17:08:33 -04:00
compress.c bcachefs: Track incompressible data 2023-10-22 17:08:34 -04:00
compress.h
debug.c bcachefs: Kill direct access to bi_io_vec 2023-10-22 17:08:23 -04:00
debug.h
dirent.c bcachefs: Kill TRANS_RESET_MEM|TRANS_RESET_ITERS 2023-10-22 17:08:35 -04:00
dirent.h bcachefs: Convert all bch2_trans_commit() users to BTREE_INSERT_ATOMIC 2023-10-22 17:08:33 -04:00
disk_groups.c bcachefs: revamp to_text methods 2023-10-22 17:08:11 -04:00
disk_groups.h bcachefs: Erasure coding 2023-10-22 17:08:11 -04:00
ec_types.h bcachefs: Persist stripe blocks_used 2023-10-22 17:08:15 -04:00
ec.c bcachefs: Kill TRANS_RESET_MEM|TRANS_RESET_ITERS 2023-10-22 17:08:35 -04:00
ec.h bcachefs: Fix bch2_ptr_swab for indirect extents 2023-10-22 17:08:35 -04:00
error.c bcachefs: Add an option for fsck error ratelimiting 2023-10-22 17:08:31 -04:00
error.h bcachefs: Kill bch2_fs_bug() 2023-10-22 17:08:34 -04:00
extent_update.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
extent_update.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
extents_types.h bcachefs: Limit pointers to being in only one stripe 2023-10-22 17:08:29 -04:00
extents.c bcachefs: Fix off by one error in bch2_extent_crc_append() 2023-10-22 17:08:36 -04:00
extents.h bcachefs: btree_ptr_v2 2023-10-22 17:08:35 -04:00
eytzinger.h bcachefs: Fix check for if extent update is allocating 2023-10-22 17:08:14 -04:00
fifo.h bcachefs: Convert bucket invalidation to key marking path 2023-10-22 17:08:16 -04:00
fs-common.c bcachefs: Make sure we're releasing btree iterators 2023-10-22 17:08:35 -04:00
fs-common.h bcachefs: Update directory timestamps during link 2023-10-22 17:08:33 -04:00
fs-io.c bcachefs: Kill TRANS_RESET_MEM|TRANS_RESET_ITERS 2023-10-22 17:08:35 -04:00
fs-io.h bcachefs: Kill bchfs_extent_update() 2023-10-22 17:08:29 -04:00
fs-ioctl.c bcachefs: Factor out fs-common.c 2023-10-22 17:08:28 -04:00
fs-ioctl.h bcachefs: Fix mtime/ctime updates 2023-10-22 17:08:07 -04:00
fs.c bcachefs: Kill BTREE_INSERT_ATOMIC 2023-10-22 17:08:33 -04:00
fs.h bcachefs: Factor out fs-common.c 2023-10-22 17:08:28 -04:00
fsck.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
fsck.h bcachefs: some improvements to startup messages and options 2023-10-22 17:08:21 -04:00
inode.c bcachefs: Make sure we're releasing btree iterators 2023-10-22 17:08:35 -04:00
inode.h bcachefs: Kill bchfs_extent_update() 2023-10-22 17:08:29 -04:00
io_types.h bcachefs: Fix an uninitialized field in bch_write_op 2023-10-22 17:08:35 -04:00
io.c bcachefs: Don't log errors that are expected during shutdown 2023-10-22 17:08:36 -04:00
io.h bcachefs: Don't log errors that are expected during shutdown 2023-10-22 17:08:36 -04:00
journal_io.c bcachefs: Issue discards when needed to allocate journal write 2023-10-22 17:08:35 -04:00
journal_io.h bcachefs: Journal replay refactoring 2023-10-22 17:08:20 -04:00
journal_reclaim.c bcachefs: Journal pin cleanups 2023-10-22 17:08:36 -04:00
journal_reclaim.h bcachefs: Journal pin cleanups 2023-10-22 17:08:36 -04:00
journal_seq_blacklist.c bcachefs: Convert some enums to x-macros 2023-10-22 17:08:33 -04:00
journal_seq_blacklist.h bcachefs: Rewrite journal_seq_blacklist machinery 2023-10-22 17:08:20 -04:00
journal_types.h bcachefs: Journal replay refactoring 2023-10-22 17:08:20 -04:00
journal.c bcachefs: kill bch2_extent_has_device() 2023-10-22 17:08:32 -04:00
journal.h bcachefs: Refactor bch2_trans_commit() path 2023-10-22 17:08:30 -04:00
Kconfig bcachefs: use crc64 from lib/ 2023-10-22 17:08:14 -04:00
keylist_types.h
keylist.c
keylist.h
Makefile bcachefs: Split out extent_update.c 2023-10-22 17:08:32 -04:00
migrate.c bcachefs: introduce b->hash_val 2023-10-22 17:08:35 -04:00
migrate.h
move_types.h bcachefs: Only get btree iters from btree transactions 2023-10-22 17:08:18 -04:00
move.c bcachefs: Don't log errors that are expected during shutdown 2023-10-22 17:08:36 -04:00
move.h bcachefs: Reflink 2023-10-22 17:08:25 -04:00
movinggc.c bcachefs: Redo copygc throttling 2023-10-22 17:08:33 -04:00
movinggc.h
opts.c bcachefs: Convert some enums to x-macros 2023-10-22 17:08:33 -04:00
opts.h bcachefs: Convert some enums to x-macros 2023-10-22 17:08:33 -04:00
quota_types.h bcachefs: bch2_fs_quota_transfer 2023-10-22 17:08:13 -04:00
quota.c bcachefs: Split out btree_trigger_flags 2023-10-22 17:08:33 -04:00
quota.h bcachefs: more project quota fixes 2023-10-22 17:08:14 -04:00
rebalance_types.h
rebalance.c bcachefs: Track incompressible data 2023-10-22 17:08:34 -04:00
rebalance.h
recovery.c bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
recovery.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
reflink.c bcachefs: Kill TRANS_RESET_MEM|TRANS_RESET_ITERS 2023-10-22 17:08:35 -04:00
reflink.h bcachefs: Fix bch2_ptr_swab for indirect extents 2023-10-22 17:08:35 -04:00
replicas_types.h bcachefs: Switch replicas to mark_lock 2023-10-22 17:08:13 -04:00
replicas.c bcachefs: btree_ptr_v2 2023-10-22 17:08:35 -04:00
replicas.h bcachefs: Redo filesystem usage ioctls 2023-10-22 17:08:33 -04:00
siphash.c
siphash.h
six.c
six.h
str_hash.h bcachefs: Kill TRANS_RESET_MEM|TRANS_RESET_ITERS 2023-10-22 17:08:35 -04:00
super_types.h bcachefs: Verify fs hasn't been modified before going rw 2023-10-22 17:08:18 -04:00
super-io.c bcachefs: Fix a memory splat 2023-10-22 17:08:33 -04:00
super-io.h bcachefs: bch2_check_set_feature() 2023-10-22 17:08:32 -04:00
super.c bcachefs: Dont't del sysfs dir until after we go RO 2023-10-22 17:08:36 -04:00
super.h bcachefs: Don't export __bch2_fs_read_write 2023-10-22 17:08:33 -04:00
sysfs.c bcachefs: Track incompressible data 2023-10-22 17:08:34 -04:00
sysfs.h
tests.c bcachefs: Some btree iterator improvements 2023-10-22 17:08:36 -04:00
tests.h
trace.c
trace.h bcachefs: More work to avoid transaction restarts 2023-10-22 17:08:22 -04:00
util.c bcachefs: Make memcpy_to_bio() param const 2023-10-22 17:08:32 -04:00
util.h bcachefs: Make memcpy_to_bio() param const 2023-10-22 17:08:32 -04:00
vstructs.h
xattr.c bcachefs: Kill BTREE_INSERT_ATOMIC 2023-10-22 17:08:33 -04:00
xattr.h bcachefs: Make bkey types globally unique 2023-10-22 17:08:12 -04:00