commit | b9c5b64452f483162cf9841cbdd44db6b72fd67c | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Mon Feb 18 14:13:08 2008 +0100 |
committer | Jens Axboe <jens.axboe@oracle.com> | Mon Feb 18 14:13:08 2008 +0100 |
tree | facc1ea33b6570df8f387cb7c1a472bc7ab51ce5 | |
parent | 36ecec830e25ce8f707632c464e366b21a0b0f4d [diff] [blame] |
Fix random location generation with offset != 0 Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c index 8f10bfd..a56a6f2 100644 --- a/io_u.c +++ b/io_u.c
@@ -44,7 +44,7 @@ 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;