Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
63069bb6
Commit
63069bb6
authored
Aug 20, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Move node iterator fixup to extent_bset_insert()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
23bbd2bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
fs/bcachefs/extents.c
fs/bcachefs/extents.c
+10
-13
No files found.
fs/bcachefs/extents.c
View file @
63069bb6
...
...
@@ -915,6 +915,16 @@ static void extent_bset_insert(struct bch_fs *c, struct btree_iter *iter,
bch2_extent_merge_inline
(
c
,
iter
,
bkey_to_packed
(
insert
),
k
,
false
))
return
;
/*
* may have skipped past some deleted extents greater than the insert
* key, before we got to a non deleted extent and knew we could bail out
* rewind the iterator a bit if necessary:
*/
node_iter
=
l
->
iter
;
while
((
k
=
bch2_btree_node_iter_prev_all
(
&
node_iter
,
l
->
b
))
&&
bkey_cmp_left_packed
(
l
->
b
,
k
,
&
insert
->
k
.
p
)
>
0
)
l
->
iter
=
node_iter
;
k
=
bch2_btree_node_iter_bset_pos
(
&
l
->
iter
,
l
->
b
,
bset_tree_last
(
l
->
b
));
bch2_bset_insert
(
l
->
b
,
&
l
->
iter
,
k
,
insert
,
0
);
...
...
@@ -1203,19 +1213,6 @@ static void __bch2_insert_fixup_extent(struct bch_fs *c,
overlap
==
BCH_EXTENT_OVERLAP_MIDDLE
)
break
;
}
/*
* may have skipped past some deleted extents greater than the insert
* key, before we got to a non deleted extent and knew we could bail out
* rewind the iterator a bit if necessary:
*/
{
struct
btree_node_iter
node_iter
=
l
->
iter
;
while
((
_k
=
bch2_btree_node_iter_prev_all
(
&
node_iter
,
l
->
b
))
&&
bkey_cmp_left_packed
(
l
->
b
,
_k
,
&
insert
->
k
.
p
)
>
0
)
l
->
iter
=
node_iter
;
}
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment