X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=blktrace.c;h=a3474cb57ee9825077684f3b3f7de96b272a2e4c;hp=dcddd4f21b15e322ef2796d319734c4fb94a5b2a;hb=a79f17bf3bfa20b83424c2301de092bdcfbaaea4;hpb=60a6453012d026a18f9d2a15b843b2d0b178f5aa diff --git a/blktrace.c b/blktrace.c index dcddd4f2..a3474cb5 100644 --- a/blktrace.c +++ b/blktrace.c @@ -216,15 +216,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 - (uint64_t)1); -} - - /* * Store blk_io_trace data in an ipo for later retrieval. */ @@ -239,7 +230,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 +288,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;