[patch 8/9] fio: fix last block never being touched by random offsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



*Resend with hopefully non mangled patches*
References: <20140220131958.965092001@xxxxxxxxxxxxxxxxxx>
Content-Disposition: inline; filename=fix_last_block.diff

From: Peter Oberparleiter <oberpar@xxxxxxxxxxxxxxxxxx>

Fix the available range for random offsets which never touched the last block.

Signed-off-by: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
---
[diffstat]
 io_u.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/io_u.c
+++ b/io_u.c
@@ -104,7 +104,7 @@ static int __get_next_rand_offset(struct
 
 		dprint(FD_RANDOM, "off rand %llu\n", (unsigned long long) r);
 
-		*b = (lastb - 1) * (r / ((uint64_t) rmax + 1.0));
+		*b = lastb * (r / ((uint64_t) rmax + 1.0));
 	} else {
 		uint64_t off = 0;
 

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux