diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-18 03:22:30 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:37 +0300 |
commit | a0cb8d784f309d22323974e47b103bf01d0b62c0 (patch) | |
tree | 9c7cab02e1fddbe1a4224b6c17f24a6a4eb8cc2f /fs/bcachefs/trace.h | |
parent | 549d173c1bd9b58c2ad41217522462e012a6545f (diff) | |
download | linux-a0cb8d784f309d22323974e47b103bf01d0b62c0.tar.xz |
bcachefs: Inject transaction restarts in debug mode
In CONFIG_BCACHEFS_DEBUG mode, we'll now randomly issue transaction
restarts - with a decaying probability based on the number of restarts
we've already had, to ensure that transactions eventually make forward
progress. This should help shake out some bugs.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index a52da91f279e..1e9e93161509 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -707,6 +707,12 @@ DEFINE_EVENT(transaction_event, transaction_restart_ip, TP_ARGS(trans_fn, caller_ip) ); +DEFINE_EVENT(transaction_event, transaction_restart_injected, + TP_PROTO(const char *trans_fn, + unsigned long caller_ip), + TP_ARGS(trans_fn, caller_ip) +); + DEFINE_EVENT(transaction_event, trans_blocked_journal_reclaim, TP_PROTO(const char *trans_fn, unsigned long caller_ip), |