randtrimwrite: fix corner case with variable block sizes
authorVincent Fu <vincent.fu@samsung.com>
Mon, 3 Oct 2022 17:42:41 +0000 (10:42 -0700)
committerVincent Fu <vincent.fu@samsung.com>
Mon, 3 Oct 2022 21:36:57 +0000 (17:36 -0400)
commit793b868671d14f9a3e4fa76ac129545987084a8d
tree29472f53891195f97889f517c309ece7689183f9
parent5e0863daaad1826a6b429e961d9ee83edcaf77ba
randtrimwrite: fix corner case with variable block sizes

When we have variable block sizes it's possible to finish a trim + write
pair and then have the next (smaller length) trim operation have a
different start offset but the same end offset as the previous pair of
trim and write operations. This would fool fio into believing that it
had already completed a trim + write pair when it actually completed
only the trim.

Resolve this problem by comparing start offsets instead of end offsets.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
io_u.c