Loading fs/bcachefs/move.c +18 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,19 @@ trace_io_move_pred2(struct bch_fs *c, struct bkey_s_c k, printbuf_exit(&buf); } static noinline void trace_io_move_evacuate_bucket2(struct bch_fs *c, struct bpos bucket, int gen) { struct printbuf buf = PRINTBUF; prt_printf(&buf, "bucket: "); bch2_bpos_to_text(&buf, bucket); prt_printf(&buf, " gen: %i\n", gen); trace_io_move_evacuate_bucket(c, buf.buf); printbuf_exit(&buf); } struct moving_io { struct list_head read_list; struct list_head io_list; Loading Loading @@ -1059,8 +1072,13 @@ int bch2_evacuate_bucket(struct moving_context *ctxt, struct bpos bucket, int gen, struct data_update_opts data_opts) { struct bch_fs *c = ctxt->trans->c; struct evacuate_bucket_arg arg = { bucket, gen, data_opts, }; count_event(c, io_move_evacuate_bucket); if (trace_io_move_evacuate_bucket_enabled()) trace_io_move_evacuate_bucket2(c, bucket, gen); return __bch2_move_data_phys(ctxt, bucket_in_flight, bucket.inode, bucket.offset, Loading fs/bcachefs/sb-counters_format.h +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ enum counters_flags { x(io_move_write_fail, 82, TYPE_COUNTER) \ x(io_move_start_fail, 39, TYPE_COUNTER) \ x(io_move_created_rebalance, 83, TYPE_COUNTER) \ x(io_move_evacuate_bucket, 84, TYPE_COUNTER) \ x(bucket_invalidate, 3, TYPE_COUNTER) \ x(bucket_discard, 4, TYPE_COUNTER) \ x(bucket_discard_fast, 79, TYPE_COUNTER) \ Loading fs/bcachefs/trace.h +5 −0 Original line number Diff line number Diff line Loading @@ -1441,6 +1441,11 @@ DEFINE_EVENT(fs_str, io_move_created_rebalance, TP_ARGS(c, str) ); DEFINE_EVENT(fs_str, io_move_evacuate_bucket, TP_PROTO(struct bch_fs *c, const char *str), TP_ARGS(c, str) ); TRACE_EVENT(error_downcast, TP_PROTO(int bch_err, int std_err, unsigned long ip), TP_ARGS(bch_err, std_err, ip), Loading Loading
fs/bcachefs/move.c +18 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,19 @@ trace_io_move_pred2(struct bch_fs *c, struct bkey_s_c k, printbuf_exit(&buf); } static noinline void trace_io_move_evacuate_bucket2(struct bch_fs *c, struct bpos bucket, int gen) { struct printbuf buf = PRINTBUF; prt_printf(&buf, "bucket: "); bch2_bpos_to_text(&buf, bucket); prt_printf(&buf, " gen: %i\n", gen); trace_io_move_evacuate_bucket(c, buf.buf); printbuf_exit(&buf); } struct moving_io { struct list_head read_list; struct list_head io_list; Loading Loading @@ -1059,8 +1072,13 @@ int bch2_evacuate_bucket(struct moving_context *ctxt, struct bpos bucket, int gen, struct data_update_opts data_opts) { struct bch_fs *c = ctxt->trans->c; struct evacuate_bucket_arg arg = { bucket, gen, data_opts, }; count_event(c, io_move_evacuate_bucket); if (trace_io_move_evacuate_bucket_enabled()) trace_io_move_evacuate_bucket2(c, bucket, gen); return __bch2_move_data_phys(ctxt, bucket_in_flight, bucket.inode, bucket.offset, Loading
fs/bcachefs/sb-counters_format.h +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ enum counters_flags { x(io_move_write_fail, 82, TYPE_COUNTER) \ x(io_move_start_fail, 39, TYPE_COUNTER) \ x(io_move_created_rebalance, 83, TYPE_COUNTER) \ x(io_move_evacuate_bucket, 84, TYPE_COUNTER) \ x(bucket_invalidate, 3, TYPE_COUNTER) \ x(bucket_discard, 4, TYPE_COUNTER) \ x(bucket_discard_fast, 79, TYPE_COUNTER) \ Loading
fs/bcachefs/trace.h +5 −0 Original line number Diff line number Diff line Loading @@ -1441,6 +1441,11 @@ DEFINE_EVENT(fs_str, io_move_created_rebalance, TP_ARGS(c, str) ); DEFINE_EVENT(fs_str, io_move_evacuate_bucket, TP_PROTO(struct bch_fs *c, const char *str), TP_ARGS(c, str) ); TRACE_EVENT(error_downcast, TP_PROTO(int bch_err, int std_err, unsigned long ip), TP_ARGS(bch_err, std_err, ip), Loading