Change option defaults and some generated option strings to specify
the number of bytes without units, so they are immune to the
interpretation of the units (e.g. is 1M interpreted as
1048576 or
1000000).
Signed-off-by: Jens Axboe <axboe@fb.com>
.off3 = offsetof(struct thread_options, bs[DDIR_TRIM]),
.minval = 1,
.help = "Block size unit",
.off3 = offsetof(struct thread_options, bs[DDIR_TRIM]),
.minval = 1,
.help = "Block size unit",
.parent = "rw",
.hide = 1,
.interval = 512,
.parent = "rw",
.hide = 1,
.interval = 512,
.type = FIO_OPT_INT,
.off1 = offsetof(struct act_options, write_size),
.help = "Size of large block ops (writes)",
.type = FIO_OPT_INT,
.off1 = offsetof(struct act_options, write_size),
.help = "Size of large block ops (writes)",
.category = FIO_OPT_C_PROFILE,
.group = FIO_OPT_G_ACT,
},
.category = FIO_OPT_C_PROFILE,
.group = FIO_OPT_G_ACT,
},
return 1;
if (act_add_opt("filename=%s", dev))
return 1;
return 1;
if (act_add_opt("filename=%s", dev))
return 1;
- if (act_add_opt("bs=1M"))
+ if (act_add_opt("bs=1048576"))
return 1;
if (act_add_opt("zero_buffers"))
return 1;
return 1;
if (act_add_opt("zero_buffers"))
return 1;
return 1;
if (act_add_opt("filename=%s", dev))
return 1;
return 1;
if (act_add_opt("filename=%s", dev))
return 1;
- if (act_add_opt("bs=4k"))
+ if (act_add_opt("bs=4096"))
return 1;
if (act_add_opt("ioengine=libaio"))
return 1;
return 1;
if (act_add_opt("ioengine=libaio"))
return 1;
.type = FIO_OPT_INT,
.off1 = offsetof(struct tiobench_options, bs),
.help = "Block size in bytes",
.type = FIO_OPT_INT,
.off1 = offsetof(struct tiobench_options, bs),
.help = "Block size in bytes",
.category = FIO_OPT_C_PROFILE,
.group = FIO_OPT_G_TIOBENCH,
},
.category = FIO_OPT_C_PROFILE,
.group = FIO_OPT_G_TIOBENCH,
},
if args.read == None:
if os.name == 'posix':
args.read = '/dev/zero'
if args.read == None:
if os.name == 'posix':
args.read = '/dev/zero'
- extra = [ "--size=128M" ]
+ extra = [ "--size=134217728" ] # 128 MiB
else:
print "ERROR: file for read testing must be specified on non-posix systems"
sys.exit(1)
else:
print "ERROR: file for read testing must be specified on non-posix systems"
sys.exit(1)