aboutsummaryrefslogtreecommitdiff
path: root/blkrawverify.c
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-09-04 13:33:33 -0700
committerXin Li <delphij@google.com>2019-09-04 13:33:33 -0700
commit06df218bfc98fa7f56cbc65143ed6b35ed2535f8 (patch)
tree28ce16b16a7e52db33e3f6e094e396893e0d2001 /blkrawverify.c
parentfcf2bbd5a3d2553125dfc4055fe4ae57c5499669 (diff)
parentc8a6a475f46ae2cf8a9d3c32262b00b14123d9e6 (diff)
downloadblktrace-06df218bfc98fa7f56cbc65143ed6b35ed2535f8.tar.gz
DO NOT MERGE - Merge Android 10 into master
Bug: 139893257 Change-Id: Icca1852f77cb4cc70efa1f6ec95acfe013f8aac3
Diffstat (limited to 'blkrawverify.c')
-rw-r--r--blkrawverify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/blkrawverify.c b/blkrawverify.c
index e669179..ed5d258 100644
--- a/blkrawverify.c
+++ b/blkrawverify.c
@@ -39,7 +39,7 @@ int data_is_native = -1;
static struct trace_info traces[] = {
TRACE_TO_STRING( BLK_TC_READ ),
TRACE_TO_STRING( BLK_TC_WRITE ),
- TRACE_TO_STRING( BLK_TC_BARRIER ),
+ TRACE_TO_STRING( BLK_TC_FLUSH ),
TRACE_TO_STRING( BLK_TC_SYNC ),
TRACE_TO_STRING( BLK_TC_QUEUE ),
TRACE_TO_STRING( BLK_TC_REQUEUE ),
@@ -50,6 +50,7 @@ static struct trace_info traces[] = {
TRACE_TO_STRING( BLK_TC_AHEAD ),
TRACE_TO_STRING( BLK_TC_META ),
TRACE_TO_STRING( BLK_TC_DISCARD ),
+ TRACE_TO_STRING( BLK_TC_FUA ),
};
#define N_TRACES (sizeof(traces) / sizeof(struct trace_info))
@@ -86,7 +87,7 @@ static char *act_to_str(__u32 action)
unsigned int act = action & 0xffff;
unsigned int trace = (action >> BLK_TC_SHIFT) & 0xffff;
- if (act <= N_ACTS) {
+ if (act < N_ACTS) {
sprintf(buf, "%s ", acts[act].string);
for (i = 0; i < N_TRACES; i++)
if (trace & (1 << i)) {
@@ -200,6 +201,7 @@ static int process(FILE **fp, char *devname, char *file, unsigned int cpu)
if (n == 0) {
INC_BAD("bad pdu");
nbad_seq++;
+ free(pdu_buf);
break;
}
free(pdu_buf);