summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_update_leaf.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-12-22 23:39:28 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:33 -0400
commit58e2388f9e11eb2dfb12d7d11a9a3559cd0e8945 (patch)
treec94be3118875e64abbd1bd920c6dddac33bde2a7 /fs/bcachefs/btree_update_leaf.c
parentb1fd23df1deda45a408d007aa0b105569d12b907 (diff)
downloadlwn-58e2388f9e11eb2dfb12d7d11a9a3559cd0e8945.tar.gz
lwn-58e2388f9e11eb2dfb12d7d11a9a3559cd0e8945.zip
bcachefs: Kill BTREE_INSERT_ATOMIC
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update_leaf.c')
-rw-r--r--fs/bcachefs/btree_update_leaf.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/fs/bcachefs/btree_update_leaf.c b/fs/bcachefs/btree_update_leaf.c
index 1112bdb689dc..94c1e1e2118a 100644
--- a/fs/bcachefs/btree_update_leaf.c
+++ b/fs/bcachefs/btree_update_leaf.c
@@ -298,8 +298,6 @@ static inline void btree_insert_entry_checks(struct btree_trans *trans,
BUG_ON(bkey_cmp(bkey_start_pos(&i->k->k), i->iter->pos));
EBUG_ON((i->iter->flags & BTREE_ITER_IS_EXTENTS) &&
bkey_cmp(i->k->k.p, i->iter->l[0].b->key.k.p) > 0);
- EBUG_ON((i->iter->flags & BTREE_ITER_IS_EXTENTS) &&
- !(trans->flags & BTREE_INSERT_ATOMIC));
BUG_ON(debug_check_bkeys(c) &&
!bkey_deleted(&i->k->k) &&
@@ -641,8 +639,8 @@ int bch2_trans_commit_error(struct btree_trans *trans,
/*
* if the split succeeded without dropping locks the insert will
- * still be atomic (in the BTREE_INSERT_ATOMIC sense, what the
- * caller peeked() and is overwriting won't have changed)
+ * still be atomic (what the caller peeked() and is overwriting
+ * won't have changed)
*/
#if 0
/*
@@ -713,13 +711,6 @@ int bch2_trans_commit_error(struct btree_trans *trans,
return ret2;
}
- /*
- * BTREE_ITER_ATOMIC means we have to return -EINTR if we
- * dropped locks:
- */
- if (!(flags & BTREE_INSERT_ATOMIC))
- return 0;
-
trace_trans_restart_atomic(trans->ip);
}
@@ -756,9 +747,6 @@ int __bch2_trans_commit(struct btree_trans *trans)
if (!trans->nr_updates)
goto out_noupdates;
- /* for the sake of sanity: */
- EBUG_ON(trans->nr_updates > 1 && !(trans->flags & BTREE_INSERT_ATOMIC));
-
if (trans->flags & BTREE_INSERT_GC_LOCK_HELD)
lockdep_assert_held(&trans->c->gc_lock);
@@ -795,8 +783,6 @@ out:
if (likely(!(trans->flags & BTREE_INSERT_NOCHECK_RW)))
percpu_ref_put(&trans->c->writes);
out_noupdates:
- EBUG_ON(!(trans->flags & BTREE_INSERT_ATOMIC) && ret == -EINTR);
-
trans_for_each_iter_all(trans, iter)
iter->flags &= ~BTREE_ITER_KEEP_UNTIL_COMMIT;
@@ -897,7 +883,6 @@ retry:
bch2_trans_update(trans, iter, &delete);
ret = bch2_trans_commit(trans, NULL, journal_seq,
- BTREE_INSERT_ATOMIC|
BTREE_INSERT_NOFAIL);
if (ret)
break;