#include <sys/ipc.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <dlfcn.h>
#include "fio.h"
#ifndef FIO_NO_HAVE_SHM_H
#include "crc/test.h"
#include "lib/pow2.h"
+#include "lib/memcpy.h"
const char fio_version_string[] = FIO_VERSION;
int exitall_on_terminate = 0;
int output_format = FIO_OUTPUT_NORMAL;
int eta_print = FIO_ETA_AUTO;
+unsigned int eta_interval_msec = 1000;
int eta_new_line = 0;
FILE *f_out = NULL;
FILE *f_err = NULL;
.has_arg = required_argument,
.val = 'e' | FIO_CLIENT_FLAG,
},
+ {
+ .name = (char *) "eta-interval",
+ .has_arg = required_argument,
+ .val = 'O' | FIO_CLIENT_FLAG,
+ },
{
.name = (char *) "eta-newline",
.has_arg = required_argument,
.has_arg = optional_argument,
.val = 'G',
},
+ {
+ .name = (char *) "memcpytest",
+ .has_arg = optional_argument,
+ .val = 'M',
+ },
{
.name = (char *) "idle-prof",
.has_arg = required_argument,
}
if (td->io_ops) {
+ struct ioengine_ops *ops;
+ void *dlhandle;
+
/* An engine is loaded, but the requested ioengine
* may have changed.
*/
return 0;
}
+ /*
+ * Name of file and engine may be different, load ops
+ * for this name and see if they match. If they do, then
+ * the engine is unchanged.
+ */
+ dlhandle = td->io_ops_dlhandle;
+ ops = load_ioengine(td);
+ if (ops == td->io_ops && dlhandle == td->io_ops_dlhandle) {
+ if (dlhandle)
+ dlclose(dlhandle);
+ return 0;
+ }
+
+ if (dlhandle && dlhandle != td->io_ops_dlhandle)
+ dlclose(dlhandle);
+
/* Unload the old engine. */
free_ioengine(td);
}
printf(" --trigger=cmd\t\tSet this command as local trigger\n");
printf(" --trigger-remote=cmd\tSet this command as remote trigger\n");
printf(" --aux-path=path\tUse this path for fio state generated files\n");
- printf("\nFio was written by Jens Axboe <jens.axboe@oracle.com>");
- printf("\n Jens Axboe <jaxboe@fusionio.com>");
- printf("\n Jens Axboe <axboe@fb.com>\n");
+ printf("\nFio was written by Jens Axboe <axboe@kernel.dk>\n");
}
#ifdef FIO_INC_DEBUG
log_err("fio: failed parsing eta time %s\n", optarg);
exit_val = 1;
do_exit++;
+ break;
}
eta_new_line = t / 1000;
+ if (!eta_new_line) {
+ log_err("fio: eta new line time too short\n");
+ exit_val = 1;
+ do_exit++;
+ }
+ break;
+ }
+ case 'O': {
+ long long t = 0;
+
+ if (check_str_time(optarg, &t, 1)) {
+ log_err("fio: failed parsing eta interval %s\n", optarg);
+ exit_val = 1;
+ do_exit++;
+ break;
+ }
+ eta_interval_msec = t / 1000;
+ if (eta_interval_msec < DISK_UTIL_MSEC) {
+ log_err("fio: eta interval time too short (%umsec min)\n", DISK_UTIL_MSEC);
+ exit_val = 1;
+ do_exit++;
+ }
break;
}
case 'd':
do_exit++;
exit_val = fio_crctest(optarg);
break;
+ case 'M':
+ did_arg = true;
+ do_exit++;
+ exit_val = fio_memcpy_test(optarg);
+ break;
case 'L': {
long long val;