History log of /linux-master/fs/bcachefs/btree_journal_iter.c
Revision Date Author Comments
# 1189bdda 09-Apr-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Fix __bch2_btree_and_journal_iter_init_node_iter()

We weren't respecting trans->journal_replay_not_finished - we shouldn't
be searching the journal keys unless we have a ref on them.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 30e615a2 06-Apr-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Fix gap buffer bug in bch2_journal_key_insert_take()

Multiple bug fixes for journal iters:

- When the journal keys gap buffer is resized, we have to adjust the
iterators for moving the gap to the end
- We don't want to rewind iterators to point to the key we just
inserted if it's not for the correct btree/level

Also, add some new assertions.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# bdbf953b 19-Mar-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: bch2_shoot_down_journal_keys()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 40cb2623 26-Mar-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Be careful about btree node splits during journal replay

Don't pick a pivot that's going to be deleted.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 048f47e8 25-Mar-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: btree_and_journal_iter now respects trans->journal_replay_not_finished

btree_and_journal_iter is now safe to use at runtime, not just during
recovery before journal keys have been freed.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 2cce3752 25-Feb-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: split out ignore_blacklisted, ignore_not_dirty

prep work for replaying the journal backwards

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 69426613 23-Feb-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: improve move_gap()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 95ffc7fb 23-Feb-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: journal_keys now uses darray helpers

nice bit of code cleanup

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 894d0622 23-Feb-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Rename journal_keys.d -> journal_keys.data

This will let us use some darray helpers in the next patch.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 0b5961b0 23-Feb-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: jset_entry for loops declare loop iter

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# cb6fc943 01-Feb-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: kill kvpmalloc()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 5f43b013 22-Jan-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: btree node prefetching in check_topology

btree_and_journal_iter is old code that we want to get rid of, but we're
not ready to yet.

lack of btree node prefetching is, it turns out, a real performance
issue for fsck on spinning rust, so - add it.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# fc634d8e 22-Jan-2024 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: btree_and_journal_iter.trans

we now always have a btree_trans when using a btree_and_journal_iter;
prep work for adding prefetching to btree_and_journal_iter

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# f412392f 27-Dec-2023 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: __journal_keys_sort() refactoring

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 3c471b65 26-Nov-2023 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: convert bch_fs_flags to x-macro

Now we can print out filesystem flags in sysfs, useful for debugging
various "what's my filesystem doing" issues.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# ad9c7992 17-Nov-2023 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Kill btree_iter->journal_pos

For BTREE_ITER_WITH_JOURNAL, we memoize lookups in the journal keys, to
avoid the binary search overhead.

Previously we stashed the pos of the last key returned from the journal,
in order to force the lookup to be redone when rewinding.

Now bch2_journal_keys_peek_upto() handles rewinding itself when
necessary - so we can slim down btree_iter.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 8a443d3e 17-Nov-2023 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Proper refcounting for journal_keys

The btree iterator code overlays keys from the journal until journal
replay is finished; since we're now starting copygc/rebalance etc.
before replay is finished, this is multithreaded access and thus needs
refcounting.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# 401585fe 05-Aug-2023 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: btree_journal_iter.c

Split out a new file from recovery.c for managing the list of keys we
read from the journal: before journal replay finishes the btree iterator
code needs to be able to iterate over and return keys from the journal
as well, so there's a fair bit of code here.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>