From 4b957af9246d7f533997ba47e84b7ae1ac19c9d3 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 23 May 2010 17:24:43 -0800 Subject: [PATCH] fixed random walk --- bcache-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bcache-test.c b/bcache-test.c index aa14fc89..ab9c77eb 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;