X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=blktrace.c;h=65b600f5cfed020c2008e3c77511829fcd4cf02b;hp=deb8b2d6d68eb465b1929fd9565cde900d9b408c;hb=24cab44e2840067203ac9ce52b48a7c21e647680;hpb=984f30c9756b50c1507b287c71243e2c06efff16 diff --git a/blktrace.c b/blktrace.c index deb8b2d6..65b600f5 100644 --- a/blktrace.c +++ b/blktrace.c @@ -10,6 +10,7 @@ #include "flist.h" #include "fio.h" +#include "blktrace.h" #include "blktrace_api.h" #include "oslib/linux-dev-lookup.h" @@ -216,15 +217,6 @@ static void t_bytes_align(struct thread_options *o, struct blk_io_trace *t) t->bytes = (t->bytes + o->replay_align - 1) & ~(o->replay_align - 1); } -static void ipo_bytes_align(struct thread_options *o, struct io_piece *ipo) -{ - if (!o->replay_align) - return; - - ipo->offset &= ~(o->replay_align - 1); -} - - /* * Store blk_io_trace data in an ipo for later retrieval. */ @@ -239,7 +231,7 @@ static void store_ipo(struct thread_data *td, unsigned long long offset, ipo->offset = offset * bs; if (td->o.replay_scale) ipo->offset = ipo->offset / td->o.replay_scale; - ipo_bytes_align(&td->o, ipo); + ipo_bytes_align(td->o.replay_align, ipo); ipo->len = bytes; ipo->delay = ttime / 1000; if (rw) @@ -297,7 +289,7 @@ static void handle_trace_discard(struct thread_data *td, ipo->offset = t->sector * bs; if (td->o.replay_scale) ipo->offset = ipo->offset / td->o.replay_scale; - ipo_bytes_align(&td->o, ipo); + ipo_bytes_align(td->o.replay_align, ipo); ipo->len = t->bytes; ipo->delay = ttime / 1000; ipo->ddir = DDIR_TRIM;