summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_update.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/btree_update.h')
-rw-r--r--fs/bcachefs/btree_update.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/fs/bcachefs/btree_update.h b/fs/bcachefs/btree_update.h
index 7f61351aed71..add7217598ed 100644
--- a/fs/bcachefs/btree_update.h
+++ b/fs/bcachefs/btree_update.h
@@ -15,7 +15,7 @@ bool bch2_btree_bset_insert_key(struct btree_iter *, struct btree *,
void bch2_btree_journal_key(struct btree_trans *, struct btree_iter *,
struct bkey_i *);
-enum {
+enum btree_insert_flags {
__BTREE_INSERT_NOUNLOCK,
__BTREE_INSERT_NOFAIL,
__BTREE_INSERT_NOCHECK_RW,
@@ -24,9 +24,6 @@ enum {
__BTREE_INSERT_USE_ALLOC_RESERVE,
__BTREE_INSERT_JOURNAL_REPLAY,
__BTREE_INSERT_JOURNAL_RESERVED,
- __BTREE_INSERT_NOMARK_OVERWRITES,
- __BTREE_INSERT_NOMARK,
- __BTREE_INSERT_BUCKET_INVALIDATE,
__BTREE_INSERT_NOWAIT,
__BTREE_INSERT_GC_LOCK_HELD,
__BCH_HASH_SET_MUST_CREATE,
@@ -53,14 +50,6 @@ enum {
#define BTREE_INSERT_JOURNAL_RESERVED (1 << __BTREE_INSERT_JOURNAL_RESERVED)
-/* Don't mark overwrites, just new key: */
-#define BTREE_INSERT_NOMARK_OVERWRITES (1 << __BTREE_INSERT_NOMARK_OVERWRITES)
-
-/* Don't call mark new key at all: */
-#define BTREE_INSERT_NOMARK (1 << __BTREE_INSERT_NOMARK)
-
-#define BTREE_INSERT_BUCKET_INVALIDATE (1 << __BTREE_INSERT_BUCKET_INVALIDATE)
-
/* Don't block on allocation failure (for new btree nodes: */
#define BTREE_INSERT_NOWAIT (1 << __BTREE_INSERT_NOWAIT)
#define BTREE_INSERT_GC_LOCK_HELD (1 << __BTREE_INSERT_GC_LOCK_HELD)
@@ -108,15 +97,15 @@ static inline int bch2_trans_commit(struct btree_trans *trans,
}
static inline void bch2_trans_update(struct btree_trans *trans,
- struct btree_iter *iter,
- struct bkey_i *k)
+ struct btree_iter *iter, struct bkey_i *k,
+ enum btree_trigger_flags flags)
{
EBUG_ON(trans->nr_updates >= trans->nr_iters);
iter->flags |= BTREE_ITER_KEEP_UNTIL_COMMIT;
trans->updates[trans->nr_updates++] = (struct btree_insert_entry) {
- .iter = iter, .k = k
+ .trigger_flags = flags, .iter = iter, .k = k
};
}