kernel-hacking-2024-linux-s.../fs/bcachefs
Kent Overstreet 2574e95a8b bcachefs: Refactor disk accounting data structures
Break up the percpu counter allocations into individual allocations for
each disk accounting counter; this fixes an issue on large systems where
we have too many replica entries to for the percpu allocator's max
practical size.

Also, use just one eytzinger tree for the normal set of counters and the
gc counters; this simplifies accounting_gc_done() where we need the same
set of counters to be present in both tables.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-14 19:00:15 -04:00
..
acl.c bcachefs: fix ei_update_lock lock ordering 2024-07-14 19:00:11 -04:00
acl.h
alloc_background.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
alloc_background.h bcachefs: Disk space accounting rewrite 2024-07-14 19:00:13 -04:00
alloc_background_format.h bcachefs: bch_alloc->stripe_sectors 2024-07-14 19:00:12 -04:00
alloc_foreground.c bcachefs: Convert gc to new accounting 2024-07-14 19:00:13 -04:00
alloc_foreground.h bcachefs: bch2_btree_reserve_cache_to_text() 2024-07-14 19:00:11 -04:00
alloc_types.h bcachefs: Allocator prefers not to expand mi.btree_allocated bitmap 2024-05-08 17:29:24 -04:00
backpointers.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
backpointers.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
bbpos.h
bbpos_types.h bcachefs: Pin btree cache in ram for random access in fsck 2024-03-13 21:22:24 -04:00
bcachefs.h bcachefs: Refactor disk accounting data structures 2024-07-14 19:00:15 -04:00
bcachefs_format.h bcachefs: Disk space accounting rewrite 2024-07-14 19:00:13 -04:00
bcachefs_ioctl.h bcachefs: BCH_IOCTL_QUERY_ACCOUNTING 2024-07-14 19:00:15 -04:00
bkey.c bcachefs: Fix shift greater than integer size 2024-06-28 19:42:22 -04:00
bkey.h bcachefs: bch2_btree_write_buffer_maybe_flush() 2024-06-29 18:34:52 -04:00
bkey_buf.h
bkey_cmp.h
bkey_methods.c bcachefs: KEY_TYPE_accounting 2024-07-14 19:00:13 -04:00
bkey_methods.h bcachefs: Fix array-index-out-of-bounds 2024-06-19 18:27:23 -04:00
bkey_sort.c bcachefs: Fix needs_whiteout BUG_ON() in bkey_sort() 2024-05-08 14:56:09 -04:00
bkey_sort.h bcachefs: Fix needs_whiteout BUG_ON() in bkey_sort() 2024-05-08 14:56:09 -04:00
bkey_types.h bcachefs: Split out bkey_types.h 2024-03-13 21:22:26 -04:00
bset.c bcachefs: for_each_bset() declares loop iter 2024-05-09 16:23:34 -04:00
bset.h bcachefs: for_each_bset() declares loop iter 2024-05-09 16:23:34 -04:00
btree_cache.c bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg() 2024-07-14 19:00:12 -04:00
btree_cache.h bcachefs: add counters for failed shrinker reclaim 2024-05-09 16:24:29 -04:00
btree_gc.c bcachefs: Refactor disk accounting data structures 2024-07-14 19:00:15 -04:00
btree_gc.h bcachefs: Walk leaf to root in btree_gc 2024-07-14 19:00:14 -04:00
btree_gc_types.h bcachefs: btree_gc can now handle unknown btrees 2024-05-28 11:29:26 -04:00
btree_io.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
btree_io.h bcachefs: btree_ptr_sectors_written() now takes bkey_s_c 2024-07-14 19:00:12 -04:00
btree_iter.c bcachefs: Plumb more logging through stdio redirect 2024-07-14 19:00:14 -04:00
btree_iter.h bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
btree_journal_iter.c bcachefs: Accumulate accounting keys in journal replay 2024-07-14 19:00:13 -04:00
btree_journal_iter.h bcachefs: Coalesce accounting keys before journal replay 2024-07-14 19:00:13 -04:00
btree_key_cache.c bcachefs: Leave a buffer in the btree key cache to avoid lock thrashing 2024-06-10 13:17:16 -04:00
btree_key_cache.h
btree_key_cache_types.h bcachefs: Btree key cache instrumentation 2024-05-08 17:29:20 -04:00
btree_locking.c bcachefs: Set PF_MEMALLOC_NOFS when trans->locked 2024-07-11 20:10:55 -04:00
btree_locking.h bcachefs: Set PF_MEMALLOC_NOFS when trans->locked 2024-07-11 20:10:55 -04:00
btree_node_scan.c bcachefs: Fix incorrect error handling found_btree_node_is_readable() 2024-06-10 13:17:15 -04:00
btree_node_scan.h bcachefs: Repair pass for scanning for btree nodes 2024-04-03 14:44:18 -04:00
btree_node_scan_types.h bcachefs: btree node scan now fills in sectors_written 2024-04-28 21:34:29 -04:00
btree_trans_commit.c bcachefs: btree_types bitmask cleanups 2024-07-14 19:00:14 -04:00
btree_types.h bcachefs: btree_types bitmask cleanups 2024-07-14 19:00:14 -04:00
btree_update.c bcachefs: bch2_btree_insert() - add btree iter flags 2024-07-14 19:00:15 -04:00
btree_update.h bcachefs: bch2_btree_insert() - add btree iter flags 2024-07-14 19:00:15 -04:00
btree_update_interior.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
btree_update_interior.h bcachefs: bch2_btree_reserve_cache_to_text() 2024-07-14 19:00:11 -04:00
btree_write_buffer.c bcachefs: Eytzinger accumulation for accounting keys 2024-07-14 19:00:14 -04:00
btree_write_buffer.h bcachefs: Eytzinger accumulation for accounting keys 2024-07-14 19:00:14 -04:00
btree_write_buffer_types.h bcachefs: Eytzinger accumulation for accounting keys 2024-07-14 19:00:14 -04:00
buckets.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
buckets.h bcachefs: Convert gc to new accounting 2024-07-14 19:00:13 -04:00
buckets_types.h bcachefs: Convert gc to new accounting 2024-07-14 19:00:13 -04:00
buckets_waiting_for_journal.c
buckets_waiting_for_journal.h
buckets_waiting_for_journal_types.h
chardev.c bcachefs: fix smatch data leak warning in fs usage ioctl 2024-07-14 19:00:15 -04:00
chardev.h
checksum.c bcachefs: Fix stack oob in __bch2_encrypt_bio() 2024-05-22 19:01:17 -04:00
checksum.h bcachefs: Standardize helpers for printing enum strs with bounds checks 2024-04-13 22:48:17 -04:00
clock.c bcachefs: io clock: run timer fns under clock lock 2024-07-01 22:56:28 -04:00
clock.h
clock_types.h
compress.c bcachefs: kill kvpmalloc() 2024-03-13 18:39:12 -04:00
compress.h bcachefs: Standardize helpers for printing enum strs with bounds checks 2024-04-13 22:48:17 -04:00
darray.c
darray.h
data_update.c bcachefs: Warn on attempting a move with no replicas 2024-07-10 09:53:39 -04:00
data_update.h bcachefs: bch2_data_update_to_text() 2024-07-10 09:53:39 -04:00
debug.c bcachefs: Fix loop restart in bch2_btree_transactions_read() 2024-06-28 21:08:48 -04:00
debug.h
dirent.c bcachefs: bch2_dir_emit() - fix directory reads in the fuse driver 2024-07-14 19:00:14 -04:00
dirent.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
dirent_format.h
disk_accounting.c bcachefs: Refactor disk accounting data structures 2024-07-14 19:00:15 -04:00
disk_accounting.h bcachefs: Refactor disk accounting data structures 2024-07-14 19:00:15 -04:00
disk_accounting_format.h bcachefs: bch_acct_rebalance_work 2024-07-14 19:00:14 -04:00
disk_accounting_types.h bcachefs: Refactor disk accounting data structures 2024-07-14 19:00:15 -04:00
disk_groups.c bcachefs: Add error code to defer option parsing 2024-07-14 19:00:12 -04:00
disk_groups.h
disk_groups_format.h bcachefs: Split out disk_groups_format.h 2024-05-28 17:32:03 -04:00
disk_groups_types.h
ec.c bcachefs: Convert gc to new accounting 2024-07-14 19:00:13 -04:00
ec.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
ec_format.h
ec_types.h
errcode.c bcachefs: Errcode tracepoint, documentation 2024-03-13 21:22:25 -04:00
errcode.h bcachefs: Add error code to defer option parsing 2024-07-14 19:00:12 -04:00
error.c bcachefs: Unlock trans when waiting for user input in fsck 2024-07-14 19:00:14 -04:00
error.h bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
extent_update.c bcachefs: iter/update/trigger/str_hash flag cleanup 2024-05-08 17:29:18 -04:00
extent_update.h
extents.c bcachefs: Check for invalid bucket from bucket_gen(), gc_bucket() 2024-06-10 13:17:16 -04:00
extents.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
extents_format.h
extents_types.h
eytzinger.c bcachefs: Optimize eytzinger0_sort() with bottom-up heapsort 2024-05-08 17:29:18 -04:00
eytzinger.h bcachefs: Fix undefined behaviour in eytzinger1_first() 2024-07-10 09:53:39 -04:00
fifo.h bcachefs: kill kvpmalloc() 2024-03-13 18:39:12 -04:00
fs-common.c bcachefs: Fix error path of bch2_link_trans() 2024-05-08 17:29:21 -04:00
fs-common.h bcachefs: fix missing include 2024-07-14 19:00:12 -04:00
fs-io-buffered.c bcachefs: Use copy_folio_from_iter_atomic() 2024-05-26 22:30:09 -04:00
fs-io-buffered.h
fs-io-direct.c bcachefs: Use filemap_read() to simplify the execution flow 2024-07-14 19:00:12 -04:00
fs-io-direct.h
fs-io-pagecache.c bcachefs: iter/update/trigger/str_hash flag cleanup 2024-05-08 17:29:18 -04:00
fs-io-pagecache.h bcachefs: fix bch_folio_sector padding 2024-03-13 21:22:26 -04:00
fs-io.c bcachefs: support REMAP_FILE_DEDUP in bch2_remap_file_range 2024-07-14 19:00:15 -04:00
fs-io.h
fs-ioctl.c bcachefs: support FS_IOC_SETFSLABEL 2024-07-14 19:00:15 -04:00
fs-ioctl.h
fs.c bcachefs: Add tracepoints for bch2_sync_fs() and bch2_fsync() 2024-07-14 19:00:14 -04:00
fs.h
fsck.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
fsck.h bcachefs: bch2_check_subvolume_structure() 2024-03-13 21:22:25 -04:00
inode.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
inode.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
inode_format.h
io_misc.c bcachefs: Print allocator stuck on timeout in fallocate path 2024-07-14 19:00:11 -04:00
io_misc.h
io_read.c bcachefs: Fix bch2_read_retry_nodecode() 2024-06-28 20:47:04 -04:00
io_read.h
io_write.c bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg() 2024-07-14 19:00:12 -04:00
io_write.h
io_write_types.h bcachefs: Move nocow unlock to bch2_write_endio() 2024-05-08 17:29:24 -04:00
journal.c bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg() 2024-07-14 19:00:12 -04:00
journal.h bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg() 2024-07-14 19:00:12 -04:00
journal_io.c bcachefs: Eytzinger accumulation for accounting keys 2024-07-14 19:00:14 -04:00
journal_io.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
journal_reclaim.c bcachefs: x-macroize journal flags enums 2024-05-08 17:29:22 -04:00
journal_reclaim.h
journal_sb.c bcachefs: Plumb bch_validate_flags to sb_field_ops.validate() 2024-05-09 16:23:36 -04:00
journal_sb.h
journal_seq_blacklist.c bcachefs: Fix shift-out-of-bounds in bch2_blacklist_entries_gc 2024-06-25 17:53:31 -04:00
journal_seq_blacklist.h bcachefs: journal seq blacklist gc no longer has to walk btree 2024-05-08 17:29:20 -04:00
journal_seq_blacklist_format.h bcachefs: Split out journal_seq_blacklist_format.h 2024-05-28 17:32:03 -04:00
journal_types.h bcachefs: x-macroize journal flags enums 2024-05-08 17:29:22 -04:00
Kconfig
keylist.c
keylist.h
keylist_types.h
logged_ops.c bcachefs: iter/update/trigger/str_hash flag cleanup 2024-05-08 17:29:18 -04:00
logged_ops.h
logged_ops_format.h
lru.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
lru.h bcachefs: add check for missing fragmentation in check_alloc_to_lru_ref() 2024-06-29 18:35:18 -04:00
Makefile bcachefs: KEY_TYPE_accounting 2024-07-14 19:00:13 -04:00
mean_and_variance.c bcachefs: mean_and_variance: put struct mean_and_variance_weighted on a diet 2024-03-13 21:37:58 -04:00
mean_and_variance.h bcachefs: mean_and_variance: put struct mean_and_variance_weighted on a diet 2024-03-13 21:37:58 -04:00
mean_and_variance_test.c bcachefs: add missing MODULE_DESCRIPTION() 2024-05-28 11:29:26 -04:00
migrate.c bcachefs: iter/update/trigger/str_hash flag cleanup 2024-05-08 17:29:18 -04:00
migrate.h
move.c bcachefs: btree_ptr_sectors_written() now takes bkey_s_c 2024-07-14 19:00:12 -04:00
move.h
move_types.h
movinggc.c bcachefs: Enable automatic shrinking for rhashtables 2024-06-10 13:17:16 -04:00
movinggc.h
nocow_locking.c
nocow_locking.h
nocow_locking_types.h
opts.c bcachefs: Add error code to defer option parsing 2024-07-14 19:00:12 -04:00
opts.h bcachefs: use new mount API 2024-07-14 19:00:12 -04:00
printbuf.c bcachefs: bch2_printbuf_strip_trailing_newline() 2024-07-14 19:00:12 -04:00
printbuf.h bcachefs: bch2_printbuf_strip_trailing_newline() 2024-07-14 19:00:12 -04:00
quota.c bcachefs: Plumb bch_validate_flags to sb_field_ops.validate() 2024-05-09 16:23:36 -04:00
quota.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
quota_format.h
quota_types.h
rebalance.c bcachefs: bch2_trans_unlock() must always be followed by relock() or begin() 2024-05-08 17:29:19 -04:00
rebalance.h
rebalance_types.h
recovery.c bcachefs: bch2_btree_insert() - add btree iter flags 2024-07-14 19:00:15 -04:00
recovery.h bcachefs: Flag btrees with missing data 2024-04-03 14:46:51 -04:00
recovery_passes.c bcachefs: Disk space accounting rewrite 2024-07-14 19:00:13 -04:00
recovery_passes.h bcachefs: bch2_run_explicit_recovery_pass_persistent() 2024-03-31 20:36:12 -04:00
recovery_passes_types.h bcachefs: Disk space accounting rewrite 2024-07-14 19:00:13 -04:00
reflink.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
reflink.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
reflink_format.h
replicas.c bcachefs: Convert bch2_replicas_gc2() to new accounting 2024-07-14 19:00:13 -04:00
replicas.h bcachefs: Convert gc to new accounting 2024-07-14 19:00:13 -04:00
replicas_format.h bcachefs: Split out replicas_format.h 2024-05-28 17:32:03 -04:00
replicas_types.h bcachefs: Disk space accounting rewrite 2024-07-14 19:00:13 -04:00
sb-clean.c bcachefs: Kill writing old accounting to journal 2024-07-14 19:00:13 -04:00
sb-clean.h
sb-counters.c bcachefs: Plumb bch_validate_flags to sb_field_ops.validate() 2024-05-09 16:23:36 -04:00
sb-counters.h
sb-counters_format.h
sb-downgrade.c bcachefs: KEY_TYPE_accounting 2024-07-14 19:00:13 -04:00
sb-downgrade.h bcachefs: metadata version bucket_stripe_sectors 2024-07-14 19:00:12 -04:00
sb-downgrade_format.h bcachefs: split out sb-downgrade_format.h 2024-05-28 17:32:03 -04:00
sb-errors.c bcachefs: slab-use-after-free Read in bch2_sb_errors_from_cpu 2024-06-25 17:51:26 -04:00
sb-errors.h
sb-errors_format.h bcachefs: check_key_has_inode() 2024-07-14 19:00:12 -04:00
sb-errors_types.h bcachefs: Split out sb-errors_format.h 2024-05-28 17:33:45 -04:00
sb-members.c bcachefs: Plumb bch_validate_flags to sb_field_ops.validate() 2024-05-09 16:23:36 -04:00
sb-members.h bcachefs: kill bch2_dev_bkey_exists() in bch2_check_fix_ptrs() 2024-05-09 16:23:36 -04:00
sb-members_format.h bcachefs: split out sb-members_format.h 2024-05-28 17:32:03 -04:00
sb-members_types.h bcachefs: bucket_valid() 2024-05-08 17:29:19 -04:00
seqmutex.h bcachefs: fix seqmutex_relock() 2024-06-23 00:57:21 -04:00
siphash.c
siphash.h
six.c
six.h
snapshot.c bcachefs: fsck_err() may now take a btree_trans 2024-07-14 19:00:14 -04:00
snapshot.h bcachefs: Run check_key_has_snapshot in snapshot_delete_keys() 2024-05-28 11:29:26 -04:00
snapshot_format.h
str_hash.h bcachefs: Replace bare EEXIST with private error codes 2024-06-21 10:17:07 -04:00
subvolume.c bcachefs: bch2_btree_insert() - add btree iter flags 2024-07-14 19:00:15 -04:00
subvolume.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
subvolume_format.h bcachefs: bch_subvolume::fs_path_parent 2024-03-13 21:22:24 -04:00
subvolume_types.h bcachefs: Move snapshot table size to struct snapshot_table 2024-03-31 20:36:11 -04:00
super-io.c bcachefs: Fix shift overflow in read_one_super() 2024-06-19 18:27:23 -04:00
super-io.h bcachefs: Plumb bch_validate_flags to sb_field_ops.validate() 2024-05-09 16:23:36 -04:00
super.c bcachefs: Plumb more logging through stdio redirect 2024-07-14 19:00:14 -04:00
super.h
super_types.h bcachefs: bucket_valid() 2024-05-08 17:29:19 -04:00
sysfs.c bcachefs: bch2_fs_usage_base_to_text() 2024-07-14 19:00:13 -04:00
sysfs.h
tests.c bcachefs: bch2_btree_insert() - add btree iter flags 2024-07-14 19:00:15 -04:00
tests.h
thread_with_file.c bcachefs: bch2_stdio_redirect_readline_timeout() 2024-07-14 19:00:14 -04:00
thread_with_file.h bcachefs: bch2_stdio_redirect_readline_timeout() 2024-07-14 19:00:14 -04:00
thread_with_file_types.h bcachefs: twf: delete dead struct fields 2024-07-14 19:00:14 -04:00
time_stats.c bcachefs: time_stats: split stats-with-quantiles into a separate structure 2024-03-13 21:38:01 -04:00
time_stats.h bcachefs: time_stats: shrink time_stat_buffer for better alignment 2024-03-13 21:38:03 -04:00
trace.c
trace.h bcachefs: Add tracepoints for bch2_sync_fs() and bch2_fsync() 2024-07-14 19:00:14 -04:00
two_state_shared_lock.c
two_state_shared_lock.h bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg() 2024-07-14 19:00:12 -04:00
util.c bcachefs: fix scheduling while atomic in break_cycle() 2024-07-10 12:59:28 -04:00
util.h bcachefs: Convert gc to new accounting 2024-07-14 19:00:13 -04:00
varint.c
varint.h
vstructs.h
xattr.c bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
xattr.h bcachefs: s/bkey_invalid_flags/bch_validate_flags 2024-05-09 16:23:36 -04:00
xattr_format.h