In fiograph.py, the setup_commandline() function mistakenly initializes
the output_file variable to the input fio script file, causing this file
to always be overwritten, even if an output file is specified using the
--output option. Fix this by properly initializing the output_file
variable using the --output option argument value. If an output file
name is not provided, the input script file name is used by default.
Also fix fiograph configuration file to remove the cmdprio_percentage
option repeated entry for io_uring and libaio.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
specific_options=ime_psync ime_psyncv
[ioengine_io_uring]
-specific_options=hipri cmdprio_percentage cmdprio_percentage fixedbufs registerfiles sqthread_poll sqthread_poll_cpu nonvectored uncached nowait force_async
+specific_options=hipri cmdprio_percentage fixedbufs registerfiles sqthread_poll sqthread_poll_cpu nonvectored uncached nowait force_async
[ioengine_libaio]
-specific_options=userspace_reap cmdprio_percentage cmdprio_percentage nowait
+specific_options=userspace_reap cmdprio_percentage nowait
[ioengine_libcufile]
specific_options=gpu_dev_ids cuda_io
def main():
global config_file
args = setup_commandline()
- output_file = args.file
if args.output is None:
+ output_file = args.file
output_file = output_file.replace('.fio', '')
+ else:
+ output_file = args.output
config_file = configparser.RawConfigParser(allow_no_value=True)
config_file.read(args.config)
fio_to_graphviz(args.file, args.format).render(output_file, view=args.view)