Menu

#6 lmdd Fails on Fails to output files over 2 GB

open
nobody
None
5
2007-12-19
2007-12-19
Anonymous
No

When you run lmdd outputting a file over 2 GB, the lmdd process will fail. Here is the output of a failed lmdd:

lmdd if=/dev/zero of=/mnt/tmp/metadata.bin bs=4m move=4g
write: wanted=4194304 got=1282048
2080.3748 MB in 42.9432 secs, 48.4448 MB/sec

To fix this, you need to add these 3 defines to the makefile:
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64

In lmdd.c at the getfile method where you are creating the output flags, you need to add the following lines of code:

#if defined(O_LARGEFILE)
// Linux requires this flag to open a file larger than 2^31 bytes
oflags |= O_LARGEFILE ;
#endif

This bug may affect other lmbench programs, but I haven't tried them.

Thanks

jesse.anderson*REMOVETHIS*@4bright.com

Discussion


Log in to post a comment.