Skip to contentSkip to conversation

blkrawverify: fix dumping of erroneous trace

PATCH In review Steffen Maier 1 participant 1 message Apr 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 22/31 blkrawverify: fix dumping of erroneous trace

Bytes field was output twice.
PID field was missing.

Sort device field among other fields as in struct blk_io_trace.

---
 blkrawverify.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
blkrawverify.c +3 -3
index ed5d258da438..17e36bcf05bb 100644
@@ -111,12 +111,12 @@ static void dump_trace(FILE *ofp, char *prefix, struct blk_io_trace *bit)
 	fprintf(ofp, "        %8s: %llu\n", "sector", (unsigned long long) bit->sector);
 	fprintf(ofp, "        %8s: %u\n", "bytes", bit->bytes);
 	fprintf(ofp, "        %8s: %s\n", "action", act_to_str(bit->action));
-	fprintf(ofp, "        %8s: %u\n", "bytes", bit->bytes);
+	fprintf(ofp, "        %8s: %u\n", "pid", bit->pid);
+	fprintf(ofp, "        %8s: (%u,%u)\n\n", "device", MAJOR(bit->device),
+							   MINOR(bit->device));
 	fprintf(ofp, "        %8s: %u\n", "cpu", bit->cpu);
 	fprintf(ofp, "        %8s: %u\n", "error", bit->error);
 	fprintf(ofp, "        %8s: %u\n", "pdu_len", bit->pdu_len);
-	fprintf(ofp, "        %8s: (%u,%u)\n\n", "device", MAJOR(bit->device),
-						           MINOR(bit->device));
 }
 
 static int process(FILE **fp, char *devname, char *file, unsigned int cpu)
Signature · 1 line
2.14.2