bcachefs: New data structure for buckets waiting on journal commit
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 5 Jan 2022 03:32:09 +0000 (22:32 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:22 +0000 (17:09 -0400)
commit21aec962dfec2df11694350e5b2d3a9a9c298e7d
treed30158f7891454d5789228e2d1c7e615d5e78cce
parentf443fa66c98f012412b677afc4f7096ed24108de
bcachefs: New data structure for buckets waiting on journal commit

Implement a hash table, using cuckoo hashing, for empty buckets that are
waiting on a journal commit before they can be reused.

This replaces the journal_seq field of bucket_mark, and is part of
eventually getting rid of the in memory bucket array.

We may need to make bch2_bucket_needs_journal_commit() lockless, pending
profiling and testing.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
12 files changed:
fs/bcachefs/Makefile
fs/bcachefs/alloc_background.c
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_update_leaf.c
fs/bcachefs/buckets.c
fs/bcachefs/buckets.h
fs/bcachefs/buckets_types.h
fs/bcachefs/buckets_waiting_for_journal.c [new file with mode: 0644]
fs/bcachefs/buckets_waiting_for_journal.h [new file with mode: 0644]
fs/bcachefs/buckets_waiting_for_journal_types.h [new file with mode: 0644]
fs/bcachefs/journal_io.c
fs/bcachefs/super.c