X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=blktrace.c;h=297a8a947af254200aed536788b095811a0d34ac;hp=9ce4ae29c8cbe358c4ce0913e84d407721d13c17;hb=687c6a230dfeae89454ed430ee49ed5813e146ad;hpb=d1c46c049cfba2028abc45246e2609bcee52d0f3 diff --git a/blktrace.c b/blktrace.c index 9ce4ae29..297a8a94 100644 --- a/blktrace.c +++ b/blktrace.c @@ -168,6 +168,7 @@ static void trace_add_open_event(struct thread_data *td, int fileno) struct io_piece *ipo; ipo = calloc(1, sizeof(*ipo)); + init_ipo(ipo); ipo->ddir = DDIR_INVAL; ipo->fileno = fileno; @@ -215,8 +216,8 @@ static void store_ipo(struct thread_data *td, unsigned long long offset, { struct io_piece *ipo = malloc(sizeof(*ipo)); - memset(ipo, 0, sizeof(*ipo)); - INIT_FLIST_HEAD(&ipo->list); + init_ipo(ipo); + /* * the 512 is wrong here, it should be the hardware sector size... */ @@ -256,6 +257,7 @@ static void handle_trace_discard(struct thread_data *td, struct blk_io_trace *t, { struct io_piece *ipo = malloc(sizeof(*ipo)); + init_ipo(ipo); trace_add_file(td, t->device); ios[DDIR_WRITE]++;