summaryrefslogtreecommitdiff
path: root/lib/lfsr.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2013-01-11 14:03:25 +0100
committerJens Axboe <axboe@kernel.dk>2013-01-11 14:03:25 +0100
commit7477673323a943b99ea203bb9434661d13a0159c (patch)
treeb513bf9100beb3c5035a0636d9c774da6d4979bc /lib/lfsr.h
parent38f30c81d8d194da047950cbbda3896bd35cd98c (diff)
downloadfio-7477673323a943b99ea203bb9434661d13a0159c.tar.gz
fio-7477673323a943b99ea203bb9434661d13a0159c.tar.bz2
lfsr: ensure we don't generate an offset + buflen that exceeds the max size
Currently we check for the max value, but that doesn't always work since it may not fit the minimum block size (even if it is guaranteed to be smaller than the max offset). Pass in the last valid block. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/lfsr.h')
-rw-r--r--lib/lfsr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lfsr.h b/lib/lfsr.h
index 09f5ac0b..898646e2 100644
--- a/lib/lfsr.h
+++ b/lib/lfsr.h
@@ -18,7 +18,7 @@ struct fio_lfsr {
struct lfsr_taps taps;
};
-int lfsr_next(struct fio_lfsr *fl, uint64_t *off);
+int lfsr_next(struct fio_lfsr *fl, uint64_t *off, uint64_t);
int lfsr_init(struct fio_lfsr *fl, uint64_t size, unsigned long seed);
#endif