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
61011ea2
Commit
61011ea2
authored
May 15, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Rip out old hacky transaction restart tracing
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
20bceecb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
39 deletions
+2
-39
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_cache.c
+0
-1
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.c
+1
-4
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_iter.h
+1
-21
fs/bcachefs/btree_types.h
fs/bcachefs/btree_types.h
+0
-1
fs/bcachefs/btree_update_leaf.c
fs/bcachefs/btree_update_leaf.c
+0
-12
No files found.
fs/bcachefs/btree_cache.c
View file @
61011ea2
...
...
@@ -731,7 +731,6 @@ struct btree *bch2_btree_node_get(struct bch_fs *c, struct btree_iter *iter,
if
(
bch2_btree_node_relock
(
iter
,
level
+
1
))
goto
retry
;
trans_restart
();
trace_trans_restart_btree_node_reused
(
iter
->
trans
->
ip
);
return
ERR_PTR
(
-
EINTR
);
}
...
...
fs/bcachefs/btree_iter.c
View file @
61011ea2
...
...
@@ -269,7 +269,6 @@ bool __bch2_btree_node_lock(struct btree *b, struct bpos pos,
}
if
(
unlikely
(
!
ret
))
{
trans_restart
();
trace_trans_restart_would_deadlock
(
iter
->
trans
->
ip
);
return
false
;
}
...
...
@@ -1713,7 +1712,6 @@ static int bch2_trans_realloc_iters(struct btree_trans *trans,
trans
->
size
=
new_size
;
if
(
trans
->
iters_live
)
{
trans_restart
();
trace_trans_restart_iters_realloced
(
trans
->
ip
,
trans
->
size
);
return
-
EINTR
;
}
...
...
@@ -1874,7 +1872,6 @@ static int bch2_trans_preload_mem(struct btree_trans *trans, size_t size)
trans
->
mem_bytes
=
new_bytes
;
if
(
old_bytes
)
{
trans_restart
();
trace_trans_restart_mem_realloced
(
trans
->
ip
,
new_bytes
);
return
-
EINTR
;
}
...
...
@@ -1910,7 +1907,7 @@ inline void bch2_trans_unlink_iters(struct btree_trans *trans, u64 iters)
}
}
void
__
bch2_trans_begin
(
struct
btree_trans
*
trans
)
void
bch2_trans_begin
(
struct
btree_trans
*
trans
)
{
u64
iters_to_unlink
;
...
...
fs/bcachefs/btree_iter.h
View file @
61011ea2
...
...
@@ -292,7 +292,7 @@ struct btree_iter *bch2_trans_get_node_iter(struct btree_trans *,
enum
btree_id
,
struct
bpos
,
unsigned
,
unsigned
,
unsigned
);
void
__
bch2_trans_begin
(
struct
btree_trans
*
);
void
bch2_trans_begin
(
struct
btree_trans
*
);
static
inline
void
bch2_trans_begin_updates
(
struct
btree_trans
*
trans
)
{
...
...
@@ -303,24 +303,4 @@ void *bch2_trans_kmalloc(struct btree_trans *, size_t);
void
bch2_trans_init
(
struct
btree_trans
*
,
struct
bch_fs
*
,
unsigned
,
size_t
);
int
bch2_trans_exit
(
struct
btree_trans
*
);
#ifdef TRACE_TRANSACTION_RESTARTS
#define bch2_trans_begin(_trans) \
do { \
if (is_power_of_2((_trans)->nr_restarts) && \
(_trans)->nr_restarts >= 8) \
pr_info("nr restarts: %zu", (_trans)->nr_restarts); \
\
(_trans)->nr_restarts++; \
__bch2_trans_begin(_trans); \
} while (0)
#else
#define bch2_trans_begin(_trans) __bch2_trans_begin(_trans)
#endif
#ifdef TRACE_TRANSACTION_RESTARTS_ALL
#define trans_restart(...) pr_info("transaction restart" __VA_ARGS__)
#else
#define trans_restart(...) no_printk("transaction restart" __VA_ARGS__)
#endif
#endif
/* _BCACHEFS_BTREE_ITER_H */
fs/bcachefs/btree_types.h
View file @
61011ea2
...
...
@@ -272,7 +272,6 @@ struct btree_insert_entry {
struct
btree_trans
{
struct
bch_fs
*
c
;
unsigned
long
ip
;
size_t
nr_restarts
;
u64
commit_start
;
u64
iters_linked
;
...
...
fs/bcachefs/btree_update_leaf.c
View file @
61011ea2
...
...
@@ -439,7 +439,6 @@ static int bch2_trans_journal_preres_get(struct btree_trans *trans)
return
ret
;
if
(
!
bch2_trans_relock
(
trans
))
{
trans_restart
(
" (iter relock after journal preres get blocked)"
);
trace_trans_restart_journal_preres_get
(
trans
->
ip
);
return
-
EINTR
;
}
...
...
@@ -569,7 +568,6 @@ static inline int do_btree_insert_at(struct btree_trans *trans,
if
(
race_fault
())
{
ret
=
-
EINTR
;
trans_restart
(
" (race)"
);
trace_trans_restart_fault_inject
(
trans
->
ip
);
goto
out
;
}
...
...
@@ -718,7 +716,6 @@ int bch2_trans_commit_error(struct btree_trans *trans,
if
(
!
ret
||
ret
==
-
EINTR
||
(
flags
&
BTREE_INSERT_NOUNLOCK
))
{
trans_restart
(
" (split)"
);
trace_trans_restart_btree_node_split
(
trans
->
ip
);
ret
=
-
EINTR
;
}
...
...
@@ -738,7 +735,6 @@ int bch2_trans_commit_error(struct btree_trans *trans,
if
(
bch2_trans_relock
(
trans
))
return
0
;
trans_restart
(
" (iter relock after marking replicas)"
);
trace_trans_restart_mark_replicas
(
trans
->
ip
);
ret
=
-
EINTR
;
break
;
...
...
@@ -752,7 +748,6 @@ int bch2_trans_commit_error(struct btree_trans *trans,
if
(
bch2_trans_relock
(
trans
))
return
0
;
trans_restart
(
" (iter relock after journal res get blocked)"
);
trace_trans_restart_journal_res_get
(
trans
->
ip
);
ret
=
-
EINTR
;
break
;
...
...
@@ -765,7 +760,6 @@ int bch2_trans_commit_error(struct btree_trans *trans,
int
ret2
=
bch2_btree_iter_traverse_all
(
trans
);
if
(
ret2
)
{
trans_restart
(
" (traverse)"
);
trace_trans_restart_traverse
(
trans
->
ip
);
return
ret2
;
}
...
...
@@ -777,7 +771,6 @@ int bch2_trans_commit_error(struct btree_trans *trans,
if
(
!
(
flags
&
BTREE_INSERT_ATOMIC
))
return
0
;
trans_restart
(
" (atomic)"
);
trace_trans_restart_atomic
(
trans
->
ip
);
}
...
...
@@ -803,12 +796,7 @@ static int __bch2_trans_commit(struct btree_trans *trans,
int
ret
;
trans_for_each_update_iter
(
trans
,
i
)
{
unsigned
old_locks_want
=
i
->
iter
->
locks_want
;
unsigned
old_uptodate
=
i
->
iter
->
uptodate
;
if
(
!
bch2_btree_iter_upgrade
(
i
->
iter
,
1
))
{
trans_restart
(
" (failed upgrade, locks_want %u uptodate %u)"
,
old_locks_want
,
old_uptodate
);
trace_trans_restart_upgrade
(
trans
->
ip
);
ret
=
-
EINTR
;
goto
err
;
...
...
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