From 9f562414f12644ac589b21a049746a3e08b4ac83 Mon Sep 17 00:00:00 2001 From: Dongdong Tao Date: Thu, 13 Aug 2026 01:38:53 +0900 Subject: [PATCH] fix(osdtrace): prioritize MSG_OSD_REPOP in handle_full dispatch Fix an issue where subop_w (MSG_OSD_REPOP) operations with zero write bytes (op.wb == 0) were misclassified as op_r instead of print_subop_w. --- src/osdtrace.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osdtrace.cc b/src/osdtrace.cc index 77ad4ab..03c10cb 100644 --- a/src/osdtrace.cc +++ b/src/osdtrace.cc @@ -604,12 +604,12 @@ void handle_full(struct op_v *val, int osd_id) { osd_op_t op = generate_op(val); if (op.op_lat/(1000) < threshold) return; - if (op.wb == 0) { + if (op.type == MSG_OSD_REPOP) { + print_subop_w(op, osd_id); + } else if (op.wb == 0) { print_op_r(op, osd_id); } else if (op.type == MSG_OSD_OP) { print_op_w(op, osd_id); - } else if (op.type == MSG_OSD_REPOP) { - print_subop_w(op, osd_id); } else { printf("unsupported op type %d\n", op.type); }