RE: offset broken for randwrite?

From: Ryan Thomas <Ryan.Thomas_at_nuance.com>
Date: Tue, 19 Feb 2008 10:25:55 -0500

> Sorry for the late response, I was on vacation last week. It is indeed
> the offset screwing things up, mark_random_map() needs to take that into
> account. Does this work?

> diff --git a/io_u.c b/io_u.c
> index 8f10bfd..c102d5f 100644
> --- a/io_u.c
> +++ b/io_u.c
> @@ -44,7 +44,7 @@ static void mark_random_map(struct thread_data *td, struct io_u *io_u)
> unsigned int blocks;
> unsigned int nr_blocks;
>
> - block = io_u->offset / (unsigned long long) min_bs;
> + block = (io_u->offset - f->file_offset) / (unsigned long long) min_bs;
> blocks = 0;
> nr_blocks = (io_u->buflen + min_bs - 1) / min_bs;

I get segfaults with 1.18.1 (which includes the above patch) and the git-latest version as well.

vmware64 ~ # fio-1.18.1/fio xraid.fio
xraid: (g=0): rw=randwrite, bs=64K-64K/64K-64K, ioengine=libaio, iodepth=32
Starting 1 process
fio: pid=30723, got signal=11

xraid: (groupid=0, jobs=1): err= 0: pid=30723
  cpu : usr=0.00%, sys=0.00%, ctx=0, majf=0, minf=0
  IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     issued r/w: total=0/1, short=0/0

Run status group 0 (all jobs):

Disk stats (read/write):
  sdf: ios=0/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00%

I was using the same testing file as I referenced before

> [global]
> bs=64k
> size=2G
> filesize=64G
> direct=1
> rw=randwrite:1
> ioengine=libaio
> iodepth=32
> write_bw_log
> fadvise_hint=0
>
> [xraid]
> numjobs=1
> write_iolog=xr.opt.log
> offset=131072
> filename=/dev/sdf

Ryan
Received on Tue Feb 19 2008 - 16:25:55 CET

This archive was generated by hypermail 2.2.0 : Tue Feb 19 2008 - 16:30:02 CET