Re: fio always writes null bytes whatever I do

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

 



On 03/12/2015 08:32 AM, Urs Schaltegger wrote:
fio always writes null bytes whatever I do. I need random data to avoid interference of deduplication solutions (within SSDs or using ZFS).

Windows 8.1 Enterprise x64

fio-2.2.6 (also tried 2.2.0/2.2.1/2.2.3)

fio --section=fiorandom --runtime=60 <FIOFile>

<FIOFile>:

[global]
ioengine=windowsaio
thread
group_reporting
time_based
clocksource=clock_gettime
direct=1
refill_buffers
size=1g
[fiorandom]
readwrite=randwrite
numjobs=4
iodepth=1
blocksize=8k
directory=D\:\

Hmm yes, that looks like a regression. Does the attached work?


--
Jens Axboe

diff --git a/io_u.c b/io_u.c
index 6567e10a5be2..33b8ac347437 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1895,8 +1895,13 @@ void fill_io_buffer(struct thread_data *td, void *buf, unsigned int min_write,
 		} while (left);
 	} else if (o->buffer_pattern_bytes)
 		fill_buffer_pattern(td, buf, max_bs);
-	else
+	else if (o->zero_buffers)
 		memset(buf, 0, max_bs);
+	else {
+		struct frand_state *rs = get_buf_state(td);
+
+		fill_random_buf(rs, buf, max_bs);
+	}
 }
 
 /*

[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