summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-08-11 19:25:47 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-08-11 19:25:47 -0400
commit51ffcc699369deaa0fb4333a68bbbdf523afba11 (patch)
treeb4be5a5c5e9cea2b06398df26294dd7dc9593fef
parentddac1641ee1e2686c2211a8d671ea723634dfc89 (diff)
Update bcachefs sources to 49c34dadca bcachefs: Switch bch2_btree_delete_range() to bch2_trans_run()HEADmaster
-rw-r--r--.bcachefs_revision2
-rw-r--r--libbcachefs/btree_iter.c23
2 files changed, 7 insertions, 18 deletions
diff --git a/.bcachefs_revision b/.bcachefs_revision
index 7f12b42..720981c 100644
--- a/.bcachefs_revision
+++ b/.bcachefs_revision
@@ -1 +1 @@
-90a9c61e2bcf20935aebda1c0c8078ad0fff2475
+49c34dadcad9c33b1e8510b5543d60c40fa0bebd
diff --git a/libbcachefs/btree_iter.c b/libbcachefs/btree_iter.c
index 946c462..04a6131 100644
--- a/libbcachefs/btree_iter.c
+++ b/libbcachefs/btree_iter.c
@@ -1940,7 +1940,6 @@ struct btree_path *bch2_path_get(struct btree_trans *trans,
struct btree_path *path, *path_pos = NULL;
bool cached = flags & BTREE_ITER_CACHED;
bool intent = flags & BTREE_ITER_INTENT;
- bool have_dup = false;
int i;
BUG_ON(trans->restarted);
@@ -1948,24 +1947,14 @@ struct btree_path *bch2_path_get(struct btree_trans *trans,
bch2_trans_verify_locks(trans);
trans_for_each_path_inorder(trans, path, i) {
- int cmp = __btree_path_cmp(path,
- btree_id,
- cached,
- pos,
- level);
- if (cmp > 0)
+ if (__btree_path_cmp(path,
+ btree_id,
+ cached,
+ pos,
+ level) > 0)
break;
path_pos = path;
-
- if (cmp == 0) {
- if (path->ref || path->preserve) {
- path->preserve = true;
- have_dup = true;
- } else {
- break;
- }
- }
}
if (path_pos &&
@@ -1996,7 +1985,7 @@ struct btree_path *bch2_path_get(struct btree_trans *trans,
btree_trans_verify_sorted(trans);
}
- if (!(flags & BTREE_ITER_NOPRESERVE) && !have_dup)
+ if (!(flags & BTREE_ITER_NOPRESERVE))
path->preserve = true;
if (path->intent_ref)