diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-18 00:38:09 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 17:47:37 +0100 |
commit | ad9c7992eb9906caf17aa88f1fd41770879d1cb6 (patch) | |
tree | ceea9e692991bb708ee6f41afba98752db1681c7 /fs/bcachefs/btree_iter.h | |
parent | bcachefs: Kill memset() in bch2_btree_iter_init() (diff) | |
download | linux-ad9c7992eb9906caf17aa88f1fd41770879d1cb6.tar.xz linux-ad9c7992eb9906caf17aa88f1fd41770879d1cb6.zip |
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>
Diffstat (limited to 'fs/bcachefs/btree_iter.h')
-rw-r--r-- | fs/bcachefs/btree_iter.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 064720171551..9ef5021a6d37 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -455,7 +455,6 @@ static inline void bch2_trans_iter_init_common(struct btree_trans *trans, iter->pos = pos; iter->k = POS_KEY(pos); iter->journal_idx = 0; - iter->journal_pos = POS_MIN; #ifdef CONFIG_BCACHEFS_DEBUG iter->ip_allocated = ip; #endif |