dedupe: fixing bug with subsequent dedupe buffer generation
authorBar David <Bar.David@dell.com>
Thu, 1 Jul 2021 13:32:52 +0000 (16:32 +0300)
committerBar David <bardavvid@gmail.com>
Thu, 1 Jul 2021 13:39:21 +0000 (16:39 +0300)
commitc75f1778b9bbaf5877529103ac803a965fe1973d
tree54c9a7690193b0e02b605534bd4fc7038a3f65a0
parentea51055cbb2fcbca3935e25c78e8b6d358ca2b3f
dedupe: fixing bug with subsequent dedupe buffer generation

When unique pages are generated onto the write buffer the seed
used to generate the page is copied later to the buf_state_prev
for future dedupe generation.

However, the get_buf_state API returns pointer to the prev
seed. Then when the caller uses it to re-generate the buffer
it changes the internal seed and advances the PRNG.
A subsequent intention to create another dedup might result in
generating a unique page instead.

Signed-off-by: Bar David <bardavvid@gmail.com>
fio.h
io_u.c