diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-03-08 01:46:10 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:08:41 +0200 |
commit | 2ca88e5ad9b29624ea1467ef7fcc583c928fd783 (patch) | |
tree | c517d75d448c2a450896090c8bb0fcbeef78afd3 /fs/bcachefs/journal_reclaim.h | |
parent | bcachefs: Implement a new gc that only recalcs oldest gen (diff) | |
download | linux-2ca88e5ad9b29624ea1467ef7fcc583c928fd783.tar.xz linux-2ca88e5ad9b29624ea1467ef7fcc583c928fd783.zip |
bcachefs: Btree key cache
This introduces a new kind of btree iterator, cached iterators, which
point to keys cached in a hash table. The cache also acts as a write
cache - in the update path, we journal the update but defer updating the
btree until the cached entry is flushed by journal reclaim.
Cache coherency is for now up to the users to handle, which isn't ideal
but should be good enough for now.
These new iterators will be used for updating inodes and alloc info (the
alloc and stripes btrees).
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_reclaim.h')
-rw-r--r-- | fs/bcachefs/journal_reclaim.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_reclaim.h b/fs/bcachefs/journal_reclaim.h index 272ba8a37967..8128907a7623 100644 --- a/fs/bcachefs/journal_reclaim.h +++ b/fs/bcachefs/journal_reclaim.h @@ -42,6 +42,10 @@ static inline void bch2_journal_pin_add(struct journal *j, u64 seq, __bch2_journal_pin_add(j, seq, pin, flush_fn); } +void bch2_journal_pin_update(struct journal *, u64, + struct journal_entry_pin *, + journal_pin_flush_fn); + void bch2_journal_pin_copy(struct journal *, struct journal_entry_pin *, struct journal_entry_pin *, |