diff options
author | Alexander Motin <mav@FreeBSD.org> | 2014-03-02 18:19:48 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2014-03-02 18:19:48 +0000 |
commit | c58f4b5dbd7ad26da9785729425a5a7771c8050f (patch) | |
tree | 3bab62d67e2745706dc2d500664f36a1aeb4d220 /benchmarks | |
parent | 52b9f5fb3cd5e4750ee68ca16fcd4a84087c319c (diff) |
Notes
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/raidtest/Makefile | 2 | ||||
-rw-r--r-- | benchmarks/raidtest/files/raidtest.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/benchmarks/raidtest/Makefile b/benchmarks/raidtest/Makefile index aacb444102ec..dfcb6685152d 100644 --- a/benchmarks/raidtest/Makefile +++ b/benchmarks/raidtest/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= raidtest -PORTVERSION= 1.2 +PORTVERSION= 1.3 CATEGORIES= benchmarks MASTER_SITES= # none DISTFILES= # none diff --git a/benchmarks/raidtest/files/raidtest.c b/benchmarks/raidtest/files/raidtest.c index 338c69364b5e..d4557e177131 100644 --- a/benchmarks/raidtest/files/raidtest.c +++ b/benchmarks/raidtest/files/raidtest.c @@ -113,8 +113,8 @@ write_ioreq(int fd, struct ioreq *iorq) static void raidtest_genfile(int argc, char *argv[]) { - uintmax_t i, nreqs, mediasize, nsectors, nbytes, nrreqs, nwreqs; - unsigned secsize, maxsec; + uintmax_t i, nreqs, mediasize, nsectors, nbytes, nrreqs, nwreqs, maxsec; + unsigned secsize; const char *file = NULL; struct ioreq iorq; int ch, fd, flags, rdonly, wronly; @@ -189,7 +189,8 @@ raidtest_genfile(int argc, char *argv[]) iorq.iorq_length = gen_size(secsize); /* Generate I/O request offset. */ maxsec = nsectors - (iorq.iorq_length / secsize); - iorq.iorq_offset = (arc4random() % maxsec) * secsize; + iorq.iorq_offset = ((((uintmax_t)arc4random() << 32) | + arc4random()) % maxsec) * secsize; /* Generate I/O request type. */ if (rdonly) iorq.iorq_type = IO_TYPE_READ; |