bcachefs: Make BTREE_ITER_IS_EXTENTS private to iter code
Prep work for changing the core btree update path to handle extents like regular keys; we need to reduce the scope of what BTREE_ITER_IS_EXTENTS means Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
6a9ec82826
commit
c4a94ae3da
@ -408,7 +408,7 @@ static void __bch2_btree_iter_verify(struct btree_iter *iter,
|
||||
* For extents, the iterator may have skipped past deleted keys (but not
|
||||
* whiteouts)
|
||||
*/
|
||||
k = b->c.level || iter->flags & BTREE_ITER_IS_EXTENTS
|
||||
k = b->c.level || btree_node_type_is_extents(iter->btree_id)
|
||||
? bch2_btree_node_iter_prev_filter(&tmp, b, KEY_TYPE_discard)
|
||||
: bch2_btree_node_iter_prev_all(&tmp, b);
|
||||
if (k && bkey_iter_pos_cmp(b, k, &pos) >= 0) {
|
||||
@ -563,7 +563,7 @@ fixup_done:
|
||||
if (!bch2_btree_node_iter_end(node_iter) &&
|
||||
iter_current_key_modified &&
|
||||
(b->c.level ||
|
||||
(iter->flags & BTREE_ITER_IS_EXTENTS))) {
|
||||
btree_node_type_is_extents(iter->btree_id))) {
|
||||
struct bset_tree *t;
|
||||
struct bkey_packed *k, *k2, *p;
|
||||
|
||||
|
@ -780,7 +780,7 @@ int bch2_trans_update(struct btree_trans *trans, struct btree_iter *iter,
|
||||
|
||||
iter->flags |= BTREE_ITER_KEEP_UNTIL_COMMIT;
|
||||
|
||||
if (iter->flags & BTREE_ITER_IS_EXTENTS) {
|
||||
if (btree_node_type_is_extents(iter->btree_id)) {
|
||||
iter->pos_after_commit = k->k.p;
|
||||
iter->flags |= BTREE_ITER_SET_POS_AFTER_COMMIT;
|
||||
}
|
||||
@ -898,7 +898,7 @@ retry:
|
||||
*/
|
||||
delete.k.p = iter->pos;
|
||||
|
||||
if (iter->flags & BTREE_ITER_IS_EXTENTS) {
|
||||
if (btree_node_type_is_extents(iter->btree_id)) {
|
||||
unsigned max_sectors =
|
||||
KEY_SIZE_MAX & (~0 << trans->c->block_bits);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user