1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-25 17:53:34 -05:00
linux/fs/bcachefs
Kent Overstreet 39283c712e bcachefs: Fix for bad stripe pointers
The allocator usually doesn't increment bucket gens right away on
buckets that it's about to hand out (for reasons that need to be
documented), instead deferring that to whatever extent update first
references that bucket.

But stripe pointers reference buckets without changing bucket sector
counts, meaning we could end up with a pointer in a stripe with a gen
newer than the bucket it points to.

Fix this by adding a transactional trigger for KEY_TYPE_stripe that just
writes out the keys in the alloc btree for the buckets it points to.

Also - consolidate the code that checks pointer validity.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-22 17:08:44 -04:00
..
acl.c bcachefs: Split out btree_trigger_flags 2023-10-22 17:08:33 -04:00
acl.h
alloc_background.c bcachefs: Fix for bad stripe pointers 2023-10-22 17:08:44 -04:00
alloc_background.h bcachefs: Fix for bad stripe pointers 2023-10-22 17:08:44 -04:00
alloc_foreground.c bcachefs: Ensure we only allocate one EC bucket per writepoint 2023-10-22 17:08:43 -04:00
alloc_foreground.h bcachefs: Don't let copygc buckets be stolen by other threads 2023-10-22 17:08:43 -04:00
alloc_types.h bcachefs: Don't let copygc buckets be stolen by other threads 2023-10-22 17:08:43 -04:00
bcachefs.h bcachefs: Fix unmount path 2023-10-22 17:08:44 -04:00
bcachefs_format.h bcachefs: Use x-macros for data types 2023-10-22 17:08:42 -04:00
bcachefs_ioctl.h bcachefs: Track sectors of erasure coded data 2023-10-22 17:08:42 -04:00
bkey.c bcachefs: Make __bch2_bkey_cmp_packed() smaller 2023-10-22 17:08:31 -04:00
bkey.h bcachefs: Disable extent merging 2023-10-22 17:08:37 -04:00
bkey_methods.c bcachefs: Handle printing of null bkeys 2023-10-22 17:08:39 -04:00
bkey_methods.h bcachefs: Kill bkey_type_successor 2023-10-22 17:08:37 -04:00
bkey_on_stack.h bcachefs: bkey_on_stack_reassemble() 2023-10-22 17:08:32 -04:00
bkey_sort.c bcachefs: Disable extent merging 2023-10-22 17:08:37 -04:00
bkey_sort.h bcachefs: Kill btree_node_iter_large 2023-10-22 17:08:32 -04:00
bset.c bcachefs: Remove some uses of PAGE_SIZE in the btree code 2023-10-22 17:08:43 -04:00
bset.h bcachefs: Remove some uses of PAGE_SIZE in the btree code 2023-10-22 17:08:43 -04:00
btree_cache.c bcachefs: Fix another lockdep splat 2023-10-22 17:08:44 -04:00
btree_cache.h bcachefs: Remove some uses of PAGE_SIZE in the btree code 2023-10-22 17:08:43 -04:00
btree_gc.c bcachefs: Improvements to writing alloc info 2023-10-22 17:08:44 -04:00
btree_gc.h bcachefs: Implement a new gc that only recalcs oldest gen 2023-10-22 17:08:41 -04:00
btree_io.c bcachefs: Fix a bug with the journal_seq_blacklist mechanism 2023-10-22 17:08:43 -04:00
btree_io.h bcachefs: Fix a bug with the journal_seq_blacklist mechanism 2023-10-22 17:08:43 -04:00
btree_iter.c bcachefs: Fix a null ptr deref in bch2_btree_iter_traverse_one() 2023-10-22 17:08:42 -04:00
btree_iter.h bcachefs: Btree key cache 2023-10-22 17:08:41 -04:00
btree_key_cache.c bcachefs: Fix lock ordering with new btree cache code 2023-10-22 17:08:41 -04:00
btree_key_cache.h bcachefs: Fix lock ordering with new btree cache code 2023-10-22 17:08:41 -04:00
btree_locking.h bcachefs: Don't deadlock when btree node reuse changes lock ordering 2023-10-22 17:08:41 -04:00
btree_types.h bcachefs: Fix for bad stripe pointers 2023-10-22 17:08:44 -04:00
btree_update.h bcachefs: Btree key cache 2023-10-22 17:08:41 -04:00
btree_update_interior.c bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
btree_update_interior.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
btree_update_leaf.c bcachefs: Fix for bad stripe pointers 2023-10-22 17:08:44 -04:00
buckets.c bcachefs: Fix for bad stripe pointers 2023-10-22 17:08:44 -04:00
buckets.h bcachefs: Delete unused arguments 2023-10-22 17:08:43 -04:00
buckets_types.h bcachefs: Change copygc to consider bucket fragmentation 2023-10-22 17:08:43 -04:00
chardev.c bcachefs: Delete unused arguments 2023-10-22 17:08:43 -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.c bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
clock.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
clock_types.h bcachefs: Make io timers less buggy 2023-10-22 17:08:33 -04:00
compress.c bcachefs: Wrap write path in memalloc_nofs_save() 2023-10-22 17:08:42 -04:00
compress.h
debug.c bcachefs: Change bch2_dump_bset() to also print key values 2023-10-22 17:08:41 -04:00
debug.h
dirent.c bcachefs: Print out d_type in dirent_to_text() 2023-10-22 17:08:39 -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: Fix a couple null ptr derefs when no disk groups exist 2023-10-22 17:08:43 -04:00
disk_groups.h bcachefs: Fix disk groups not being updated when set via sysfs 2023-10-22 17:08:43 -04:00
ec.c bcachefs: Improvements to writing alloc info 2023-10-22 17:08:44 -04:00
ec.h bcachefs: Improvements to writing alloc info 2023-10-22 17:08:44 -04:00
ec_types.h bcachefs: Improve stripe triggers/heap code 2023-10-22 17:08:42 -04:00
error.c bcachefs: Turn c->state_lock into an rwsem 2023-10-22 17:08:41 -04:00
error.h bcachefs: Improve assorted error messages 2023-10-22 17:08:40 -04:00
extent_update.c bcachefs: Fix another iterator counting bug 2023-10-22 17:08:39 -04:00
extent_update.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
extents.c bcachefs: Refactor replicas code 2023-10-22 17:08:43 -04:00
extents.h bcachefs: Add print method for bch2_btree_ptr_v2 2023-10-22 17:08:38 -04:00
extents_types.h
eytzinger.h
fifo.h
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: Fix __bch2_truncate_page() 2023-10-22 17:08:44 -04:00
fs-io.h
fs-ioctl.c bcachefs: Some project id fixes 2023-10-22 17:08:44 -04:00
fs-ioctl.h
fs.c bcachefs: Fix journal_seq_copy() 2023-10-22 17:08:44 -04:00
fs.h
fsck.c bcachefs: Make sure to go rw if lazy in fsck 2023-10-22 17:08:44 -04:00
fsck.h
inode.c bcachefs: Kill bkey_type_successor 2023-10-22 17:08:37 -04:00
inode.h
io.c bcachefs: Fix a couple null ptr derefs when no disk groups exist 2023-10-22 17:08:43 -04:00
io.h bcachefs: Add bch2_blk_status_to_str() 2023-10-22 17:08:43 -04:00
io_types.h bcachefs: Remove some uses of PAGE_SIZE in the btree code 2023-10-22 17:08:43 -04:00
journal.c bcachefs: Fix journal_seq_copy() 2023-10-22 17:08:44 -04:00
journal.h bcachefs: Fix journal_seq_copy() 2023-10-22 17:08:44 -04:00
journal_io.c bcachefs: Improvements to the journal read error paths 2023-10-22 17:08:44 -04:00
journal_io.h bcachefs: Improvements to the journal read error paths 2023-10-22 17:08:44 -04:00
journal_reclaim.c bcachefs: Use x-macros for data types 2023-10-22 17:08:42 -04:00
journal_reclaim.h bcachefs: Btree key cache 2023-10-22 17:08:41 -04:00
journal_seq_blacklist.c bcachefs: Fix a bug with the journal_seq_blacklist mechanism 2023-10-22 17:08:43 -04:00
journal_seq_blacklist.h bcachefs: Fix a bug with the journal_seq_blacklist mechanism 2023-10-22 17:08:43 -04:00
journal_types.h bcachefs: Use cached iterators for alloc btree 2023-10-22 17:08:41 -04:00
Kconfig
keylist.c bcachefs: Interior btree updates are now fully transactional 2023-10-22 17:08:40 -04:00
keylist.h bcachefs: Interior btree updates are now fully transactional 2023-10-22 17:08:40 -04:00
keylist_types.h
Makefile bcachefs: Btree key cache 2023-10-22 17:08:41 -04:00
migrate.c bcachefs: Interior btree updates are now fully transactional 2023-10-22 17:08:40 -04:00
migrate.h
move.c bcachefs: Fix copygc of compressed data 2023-10-22 17:08:44 -04:00
move.h
move_types.h bcachefs: Improve warning for copygc failing to move data 2023-10-22 17:08:40 -04:00
movinggc.c bcachefs: Change copygc to consider bucket fragmentation 2023-10-22 17:08:43 -04:00
movinggc.h bcachefs: Make copygc thread global 2023-10-22 17:08:42 -04:00
opts.c bcachefs: Use x-macros for data types 2023-10-22 17:08:42 -04:00
opts.h bcachefs: Fix maximum btree node size 2023-10-22 17:08:43 -04:00
quota.c bcachefs: Fix setquota 2023-10-22 17:08:39 -04:00
quota.h
quota_types.h
rebalance.c bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
rebalance.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
rebalance_types.h
recovery.c bcachefs: Improvements to writing alloc info 2023-10-22 17:08:44 -04:00
recovery.h bcachefs: Fix reading of alloc info after unclean shutdown 2023-10-22 17:08:40 -04:00
reflink.c bcachefs: Add an option to disable reflink support 2023-10-22 17:08:40 -04:00
reflink.h bcachefs: Fix bch2_ptr_swab for indirect extents 2023-10-22 17:08:35 -04:00
replicas.c bcachefs: Refactor replicas code 2023-10-22 17:08:43 -04:00
replicas.h bcachefs: Refactor replicas code 2023-10-22 17:08:43 -04:00
replicas_types.h
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-io.c bcachefs: Add bch2_blk_status_to_str() 2023-10-22 17:08:43 -04:00
super-io.h bcachefs: bch2_check_set_feature() 2023-10-22 17:08:32 -04:00
super.c bcachefs: Start/stop io clock hands in read/write paths 2023-10-22 17:08:44 -04:00
super.h bcachefs: Fix unmount path 2023-10-22 17:08:44 -04:00
super_types.h
sysfs.c bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -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: Make copygc thread global 2023-10-22 17:08:42 -04:00
util.c bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
util.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
vstructs.h
xattr.c bcachefs: Some project id fixes 2023-10-22 17:08:44 -04:00
xattr.h