From: Kent Overstreet Date: Thu, 11 Aug 2022 23:25:47 +0000 (-0400) Subject: Update bcachefs sources to 49c34dadca bcachefs: Switch bch2_btree_delete_range()... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=51ffcc699369deaa0fb4333a68bbbdf523afba11;p=bcachefs-tools-debian Update bcachefs sources to 49c34dadca bcachefs: Switch bch2_btree_delete_range() to bch2_trans_run() --- 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)