Commit 8079aab0 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Split up btree_update_leaf.c

We now have
  btree_trans_commit.c
  btree_update.c
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent dbbfca9f
...@@ -15,8 +15,9 @@ bcachefs-y := \ ...@@ -15,8 +15,9 @@ bcachefs-y := \
btree_iter.o \ btree_iter.o \
btree_key_cache.o \ btree_key_cache.o \
btree_locking.o \ btree_locking.o \
btree_trans_commit.o \
btree_update.o \
btree_update_interior.o \ btree_update_interior.o \
btree_update_leaf.o \
btree_write_buffer.o \ btree_write_buffer.o \
buckets.o \ buckets.o \
buckets_waiting_for_journal.o \ buckets_waiting_for_journal.o \
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#ifndef _BCACHEFS_BTREE_GC_H #ifndef _BCACHEFS_BTREE_GC_H
#define _BCACHEFS_BTREE_GC_H #define _BCACHEFS_BTREE_GC_H
#include "bkey.h"
#include "btree_types.h" #include "btree_types.h"
int bch2_check_topology(struct bch_fs *); int bch2_check_topology(struct bch_fs *);
......
...@@ -221,6 +221,22 @@ struct btree_path *bch2_path_get(struct btree_trans *, enum btree_id, struct bpo ...@@ -221,6 +221,22 @@ struct btree_path *bch2_path_get(struct btree_trans *, enum btree_id, struct bpo
unsigned, unsigned, unsigned, unsigned long); unsigned, unsigned, unsigned, unsigned long);
struct bkey_s_c bch2_btree_path_peek_slot(struct btree_path *, struct bkey *); struct bkey_s_c bch2_btree_path_peek_slot(struct btree_path *, struct bkey *);
/*
* bch2_btree_path_peek_slot() for a cached iterator might return a key in a
* different snapshot:
*/
static inline struct bkey_s_c bch2_btree_path_peek_slot_exact(struct btree_path *path, struct bkey *u)
{
struct bkey_s_c k = bch2_btree_path_peek_slot(path, u);
if (k.k && bpos_eq(path->pos, k.k->p))
return k;
bkey_init(u);
u->p = path->pos;
return (struct bkey_s_c) { u, NULL };
}
struct bkey_i *bch2_btree_journal_peek_slot(struct btree_trans *, struct bkey_i *bch2_btree_journal_peek_slot(struct btree_trans *,
struct btree_iter *, struct bpos); struct btree_iter *, struct bpos);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment