summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5971116)
If fio dumps status through -USR1 or similar and output is
being stored in a file, the buffering on the file descriptor
by the library can cause is not to see all the output. Ensure
that it gets flushed after dumping stats.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
return fwrite(buffer, len, 1, f_out);
}
return fwrite(buffer, len, 1, f_out);
}
+int log_info_flush(void)
+{
+ if (is_backend || log_syslog)
+ return 0;
+
+ return fflush(f_out);
+}
+
int log_err(const char *format, ...)
{
char buffer[1024];
int log_err(const char *format, ...)
{
char buffer[1024];
extern int log_local(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
extern int log_valist(const char *str, va_list);
extern int log_local_buf(const char *buf, size_t);
extern int log_local(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
extern int log_valist(const char *str, va_list);
extern int log_local_buf(const char *buf, size_t);
+extern int log_info_flush(void);
enum {
FIO_LOG_DEBUG = 1,
enum {
FIO_LOG_DEBUG = 1,
show_idle_prof_stats(FIO_OUTPUT_NORMAL, NULL);
}
show_idle_prof_stats(FIO_OUTPUT_NORMAL, NULL);
}
free(runstats);
free(threadstats);
}
free(runstats);
free(threadstats);
}