ref: b8f5789e59df3a49050b37d03bb73babc58e037a
parent: 729a62cf4172100f394553f2c4d69f77148c8ce5
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Oct 13 14:28:16 EDT 2023
fsbench: fix build
--- a/test/fsbench.c
+++ b/test/fsbench.c
@@ -5,7 +5,6 @@
int mainstacksize = 2*1024*1024;
typedef struct Bench Bench;
-#define IOUNIT 32*1024
enum {
KiB = 1024ULL,
MiB = 1024ULL*KiB,
@@ -167,7 +166,7 @@
for(rep = 0; rep < b->reps; rep++){
seek(fd, 0, 0);
for(i = 0; i < b->i0; i += Bufsz){
- off = vrand(b->i0-Bufsz) & ~(Bufsz-1);
+ off = vrand(b->i0-Bufsz) & ~((uvlong)Bufsz-1);
if(pread(fd, buf, Bufsz, off) != Bufsz)
sysfatal("write: %r");
}