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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -15,8 +15,9 @@ bcachefs-y := \
	btree_iter.o		\
	btree_key_cache.o	\
	btree_locking.o		\
	btree_trans_commit.o	\
	btree_update.o		\
	btree_update_interior.o	\
	btree_update_leaf.o	\
	btree_write_buffer.o	\
	buckets.o		\
	buckets_waiting_for_journal.o	\
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
#ifndef _BCACHEFS_BTREE_GC_H
#define _BCACHEFS_BTREE_GC_H

#include "bkey.h"
#include "btree_types.h"

int bch2_check_topology(struct bch_fs *);
+16 −0
Original line number Diff line number Diff line
@@ -221,6 +221,22 @@ struct btree_path *bch2_path_get(struct btree_trans *, enum btree_id, struct bpo
				 unsigned, unsigned, unsigned, unsigned long);
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 btree_iter *, struct bpos);

+2 −953

File changed and moved.

Preview size limit exceeded, changes collapsed.

+943 −0

File added.

Preview size limit exceeded, changes collapsed.