Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
linux
Commits
9cba7bf7
Commit
9cba7bf7
authored
3 years ago
by
Kent Overstreet
Committed by
Kent Overstreet
1 year ago
Browse files
Options
Download
Email Patches
Plain Diff
bcachefs: Don't drop read locks at transaction commit time
Signed-off-by:
Kent Overstreet
<
kent.overstreet@gmail.com
>
parent
0d32711e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
fs/bcachefs/btree_update_leaf.c
fs/bcachefs/btree_update_leaf.c
+8
-19
No files found.
fs/bcachefs/btree_update_leaf.c
View file @
9cba7bf7
...
...
@@ -348,11 +348,6 @@ static inline void do_btree_insert_one(struct btree_trans *trans,
}
}
static
noinline
void
bch2_btree_iter_unlock_noinline
(
struct
btree_iter
*
iter
)
{
__bch2_btree_iter_unlock
(
iter
);
}
static
noinline
void
bch2_trans_mark_gc
(
struct
btree_trans
*
trans
)
{
struct
bch_fs
*
c
=
trans
->
c
;
...
...
@@ -582,21 +577,15 @@ static inline int do_bch2_trans_commit(struct btree_trans *trans,
* or anything else that might call bch2_trans_relock(), since that
* would just retake the read locks:
*/
trans_for_each_iter
(
trans
,
iter
)
{
if
(
iter
->
nodes_locked
!=
iter
->
nodes_intent_locked
)
{
if
(
btree_iter_keep
(
trans
,
iter
))
{
if
(
!
bch2_btree_iter_upgrade
(
iter
,
1
))
{
trace_trans_restart_upgrade
(
trans
->
ip
,
trace_ip
,
iter
->
btree_id
,
&
iter
->
real_pos
);
trans
->
restarted
=
true
;
return
-
EINTR
;
}
}
else
{
bch2_btree_iter_unlock_noinline
(
iter
);
}
trans_for_each_iter
(
trans
,
iter
)
if
(
iter
->
nodes_locked
!=
iter
->
nodes_intent_locked
&&
!
bch2_btree_iter_upgrade
(
iter
,
1
))
{
trace_trans_restart_upgrade
(
trans
->
ip
,
trace_ip
,
iter
->
btree_id
,
&
iter
->
real_pos
);
trans
->
restarted
=
true
;
return
-
EINTR
;
}
}
trans_for_each_update
(
trans
,
i
)
{
const
char
*
invalid
=
bch2_bkey_invalid
(
c
,
...
...
This diff is collapsed.
Click to expand it.
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