commit | 64d3bab79b116689ddcc40d23a42e31e4e47ad53 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@fb.com> | Mon Sep 22 14:20:05 2014 -0600 |
committer | Mohamad Ayyash <mkayyash@google.com> | Fri Mar 06 17:57:15 2015 -0800 |
tree | 9c39e0729d68358f8889fa01516daf60bd49f7c8 | |
parent | e66dac263f65ed4d762299dcdc4f9a6a3fb427a7 [diff] [blame] |
dedupe: if percentage is 100, don't go through random + math Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/io_u.c b/io_u.c index af3b415..eac871b 100644 --- a/io_u.c +++ b/io_u.c
@@ -1838,6 +1838,8 @@ if (!td->o.dedupe_percentage) return &td->buf_state; + else if (td->o.dedupe_percentage == 100) + return &td->buf_state_prev; r = __rand(&td->dedupe_state); v = 1 + (int) (100.0 * (r / (FRAND_MAX + 1.0)));