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
df8a4239
Commit
df8a4239
authored
Aug 05, 2018
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: extent_squash() can no longer fail
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
e4ccb251
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
fs/bcachefs/extents.c
fs/bcachefs/extents.c
+5
-10
No files found.
fs/bcachefs/extents.c
View file @
df8a4239
...
...
@@ -1402,7 +1402,7 @@ bch2_extent_can_insert(struct btree_insert *trans,
return
BTREE_INSERT_OK
;
}
static
enum
btree_insert_ret
static
void
extent_squash
(
struct
extent_insert_state
*
s
,
struct
bkey_i
*
insert
,
struct
bset_tree
*
t
,
struct
bkey_packed
*
_k
,
struct
bkey_s
k
,
enum
bch_extent_overlap
overlap
)
...
...
@@ -1496,8 +1496,6 @@ extent_squash(struct extent_insert_state *s, struct bkey_i *insert,
break
;
}
}
return
BTREE_INSERT_OK
;
}
static
enum
btree_insert_ret
...
...
@@ -1542,7 +1540,7 @@ __bch2_insert_fixup_extent(struct extent_insert_state *s)
_k
->
needs_whiteout
=
false
;
}
ret
=
extent_squash
(
s
,
insert
,
t
,
_k
,
k
,
overlap
);
extent_squash
(
s
,
insert
,
t
,
_k
,
k
,
overlap
);
}
else
{
if
(
bkey_whiteout
(
k
.
k
))
goto
next
;
...
...
@@ -1575,21 +1573,18 @@ __bch2_insert_fixup_extent(struct extent_insert_state *s)
discard
.
k
.
needs_whiteout
=
true
;
ret
=
extent_squash
(
s
,
insert
,
t
,
_k
,
k
,
overlap
);
BUG_ON
(
ret
!=
BTREE_INSERT_OK
);
extent_squash
(
s
,
insert
,
t
,
_k
,
k
,
overlap
);
extent_bset_insert
(
c
,
iter
,
&
discard
);
}
else
{
ret
=
extent_squash
(
s
,
insert
,
t
,
_k
,
k
,
overlap
);
BUG_ON
(
ret
!=
BTREE_INSERT_OK
);
extent_squash
(
s
,
insert
,
t
,
_k
,
k
,
overlap
);
}
next:
bch2_cut_front
(
s
->
committed
,
insert
);
bch2_btree_iter_set_pos_same_leaf
(
iter
,
s
->
committed
);
}
if
(
ret
!=
BTREE_INSERT_OK
||
overlap
==
BCH_EXTENT_OVERLAP_FRONT
||
if
(
overlap
==
BCH_EXTENT_OVERLAP_FRONT
||
overlap
==
BCH_EXTENT_OVERLAP_MIDDLE
)
break
;
}
...
...
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