summaryrefslogtreecommitdiff
path: root/bcache-test.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2010-05-23 17:24:43 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2010-05-23 17:24:43 -0800
commit4b957af9246d7f533997ba47e84b7ae1ac19c9d3 (patch)
treee138f13a6545afb3c2472768fd7b78f8f4a04f03 /bcache-test.c
parent91bc74252890f39c87e1209b520dea31cf392106 (diff)
fixed random walk
Diffstat (limited to 'bcache-test.c')
-rw-r--r--bcache-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bcache-test.c b/bcache-test.c
index aa14fc8..ab9c77e 100644
--- a/bcache-test.c
+++ b/bcache-test.c
@@ -162,7 +162,8 @@ int main(int argc, char **argv)
nbytes = randsize ? drand48() * 16 + 1 : 1;
nbytes <<= 12;
- offset += walk ? normal() * 10 : random();
+ offset >>= 12;
+ offset += walk ? normal() * 64 : random();
offset %= size;
offset <<= 12;