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
e151580d
Commit
e151580d
authored
Feb 20, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Add tracepoint & counter for btree split race
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
930256d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bcachefs_format.h
+2
-1
fs/bcachefs/btree_update_interior.c
fs/bcachefs/btree_update_interior.c
+3
-1
fs/bcachefs/trace.h
fs/bcachefs/trace.h
+6
-0
No files found.
fs/bcachefs/bcachefs_format.h
View file @
e151580d
...
...
@@ -1478,7 +1478,8 @@ struct bch_sb_field_disk_groups {
x(transaction_commit, 72) \
x(write_super, 73) \
x(trans_restart_would_deadlock_recursion_limit, 74) \
x(trans_restart_write_buffer_flush, 75)
x(trans_restart_write_buffer_flush, 75) \
x(trans_restart_split_race, 76)
enum
bch_persistent_counters
{
#define x(t, n, ...) BCH_COUNTER_##t,
...
...
fs/bcachefs/btree_update_interior.c
View file @
e151580d
...
...
@@ -1717,8 +1717,10 @@ static int bch2_btree_insert_node(struct btree_update *as, struct btree_trans *t
* We could attempt to avoid the transaction restart, by calling
* bch2_btree_path_upgrade() and allocating more nodes:
*/
if
(
b
->
c
.
level
>=
as
->
update_level
)
if
(
b
->
c
.
level
>=
as
->
update_level
)
{
trace_and_count
(
c
,
trans_restart_split_race
,
trans
,
_THIS_IP_
);
return
btree_trans_restart
(
trans
,
BCH_ERR_transaction_restart_split_race
);
}
return
btree_split
(
as
,
trans
,
path
,
b
,
keys
,
flags
);
}
...
...
fs/bcachefs/trace.h
View file @
e151580d
...
...
@@ -837,6 +837,12 @@ DEFINE_EVENT(transaction_event, trans_restart_injected,
TP_ARGS
(
trans
,
caller_ip
)
);
DEFINE_EVENT
(
transaction_event
,
trans_restart_split_race
,
TP_PROTO
(
struct
btree_trans
*
trans
,
unsigned
long
caller_ip
),
TP_ARGS
(
trans
,
caller_ip
)
);
DEFINE_EVENT
(
transaction_event
,
trans_blocked_journal_reclaim
,
TP_PROTO
(
struct
btree_trans
*
trans
,
unsigned
long
caller_ip
),
...
...
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