All transaction restarts need a tracepoint - this is essential for
debugging
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
 
 #include "bset.h"
 #include "btree_types.h"
+#include "trace.h"
 
 static inline void __btree_path_get(struct btree_path *path, bool intent)
 {
 
 static inline int btree_trans_too_many_iters(struct btree_trans *trans)
 {
-       return hweight64(trans->paths_allocated) > BTREE_ITER_MAX / 2
-               ? -EINTR : 0;
+       if (hweight64(trans->paths_allocated) > BTREE_ITER_MAX / 2) {
+               trace_trans_restart_too_many_iters(trans->fn, _THIS_IP_);
+               return btree_trans_restart(trans);
+       }
+
+       return 0;
 }
 
 static inline struct bkey_s_c
 
        TP_ARGS(trans_fn, caller_ip)
 );
 
+DEFINE_EVENT(transaction_event,        trans_restart_too_many_iters,
+       TP_PROTO(const char *trans_fn,
+                unsigned long caller_ip),
+       TP_ARGS(trans_fn, caller_ip)
+);
+
 DECLARE_EVENT_CLASS(transaction_restart_iter,
        TP_PROTO(const char *trans_fn,
                 unsigned long caller_ip,