[BUG] mmap and file init with 0 length

From: Zhang, Yanmin <yanmin_zhang_at_linux.intel.com>
Date: Wed, 26 Mar 2008 11:37:31 +0800

fio is killed with a SIGBUS. Pls. see below job file.

Actually, if the ioengine=mmap and rw=write/randwrite, fio just unlinks the
file and creates a new file whose length is 0. sys_mmap could succeed, but later
on when fio accesses the mmapped area, kernel will send fio a SIGBUS and kill it.

Could fio create a real file when ioengine=mmap and rw=write/randwrite? For exmaple,
below job_file could ask fi oto create file data0/f1 whose length is 4G.

Yanmin

********job file********

[global]
direct=0
ioengine=mmap
iodepth=256
iodepth_batch=32
size=4G
bs=1k-4k
bs_unaligned
numjobs=1
runtime=1200
group_reporting
directory=/mnt/stp/fiodata
;thread

[job_group0_sub0]
startdelay=0
rw=randwrite
;filename=data0/f1:data0/f2
filename=data0/f1

;[job_group0_sub1]
;startdelay=0
;rw=randwrite
;filename=data0/f1:data0/f2
Received on Wed Mar 26 2008 - 04:37:31 CET

This archive was generated by hypermail 2.2.0 : Wed Mar 26 2008 - 05:00:01 CET