#include "fio_version.h"
-#if FIO_PATCH > 0
-const char fio_version_string[] = __fio_stringify(FIO_MAJOR) "." \
- __fio_stringify(FIO_MINOR) "." \
- __fio_stringify(FIO_PATCH);
-#else
-const char fio_version_string[] = __fio_stringify(FIO_MAJOR) "." \
- __fio_stringify(FIO_MINOR);
-#endif
+const char fio_version_string[] = FIO_VERSION;
#define FIO_RANDSEED (0xb1899bedUL)
int exitall_on_terminate = 0;
int terse_output = 0;
int eta_print;
-unsigned long long mlock_size = 0;
FILE *f_out = NULL;
FILE *f_err = NULL;
char **job_sections = NULL;
},
};
-static void free_shm(void)
+void free_threads_shm(void)
{
struct shmid_ds sbuf;
void *tp = threads;
threads = NULL;
+ shmdt(tp);
+ shmctl(shm_id, IPC_RMID, &sbuf);
+ shm_id = -1;
+ }
+}
+
+void free_shm(void)
+{
+ if (threads) {
file_hash_exit();
flow_exit();
fio_debug_jobp = NULL;
- shmdt(tp);
- shmctl(shm_id, IPC_RMID, &sbuf);
+ free_threads_shm();
}
scleanup();
if (setup_rate(td))
goto err;
- if (td->o.write_lat_log) {
+ if (td->o.lat_log_file) {
setup_log(&td->lat_log, td->o.log_avg_msec, IO_LOG_TYPE_LAT);
setup_log(&td->slat_log, td->o.log_avg_msec, IO_LOG_TYPE_SLAT);
setup_log(&td->clat_log, td->o.log_avg_msec, IO_LOG_TYPE_CLAT);
}
- if (td->o.write_bw_log)
+ if (td->o.bw_log_file)
setup_log(&td->bw_log, td->o.log_avg_msec, IO_LOG_TYPE_BW);
- if (td->o.write_iops_log)
+ if (td->o.iops_log_file)
setup_log(&td->iops_log, td->o.log_avg_msec, IO_LOG_TYPE_IOPS);
if (!td->o.name)
static void usage(const char *name)
{
- printf("fio %s\n", fio_version_string);
+ printf("%s\n", fio_version_string);
printf("%s [options] [job options] <job file(s)>\n", name);
printf(" --debug=options\tEnable debug logging. May be one/more of:\n"
"\t\t\tprocess,file,io,mem,blktrace,verify,random,parse,\n"
break;
case 'v':
if (!cur_client) {
- log_info("fio %s\n", fio_version_string);
+ log_info("%s\n", fio_version_string);
do_exit++;
}
break;
}
if (!terse_output)
- log_info("fio %s\n", fio_version_string);
+ log_info("%s\n", fio_version_string);
return 0;
}