lfsr: ensure we don't generate an offset + buflen that exceeds the max size
authorJens Axboe <axboe@kernel.dk>
Fri, 11 Jan 2013 13:03:25 +0000 (14:03 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Jan 2013 13:03:25 +0000 (14:03 +0100)
commit7477673323a943b99ea203bb9434661d13a0159c
treeb513bf9100beb3c5035a0636d9c774da6d4979bc
parent38f30c81d8d194da047950cbbda3896bd35cd98c
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>
io_u.c
lib/lfsr.c
lib/lfsr.h