projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
iolog: allocate 'cur_log's out of shared pool
[fio.git]
/
diskutil.c
diff --git
a/diskutil.c
b/diskutil.c
index f83fc47569cff5e0206c5f621919b1e5b1dbe4d0..8031d5d9ce7e6130977c1034a5c82c8106882ea6 100644
(file)
--- a/
diskutil.c
+++ b/
diskutil.c
@@
-11,6
+11,7
@@
#include "fio.h"
#include "smalloc.h"
#include "diskutil.h"
#include "fio.h"
#include "smalloc.h"
#include "diskutil.h"
+#include "helper_thread.h"
static int last_majdev, last_mindev;
static struct disk_util *last_du;
static int last_majdev, last_mindev;
static struct disk_util *last_du;
@@
-121,7
+122,7
@@
int update_io_ticks(void)
fio_mutex_down(disk_util_mutex);
fio_mutex_down(disk_util_mutex);
- if (!helper_
exit
) {
+ if (!helper_
should_exit()
) {
flist_for_each(entry, &disk_list) {
du = flist_entry(entry, struct disk_util, list);
update_io_tick_disk(du);
flist_for_each(entry, &disk_list) {
du = flist_entry(entry, struct disk_util, list);
update_io_tick_disk(du);
@@
-695,6
+696,7
@@
void show_disk_util(int terse, struct json_object *parent,
{
struct flist_head *entry;
struct disk_util *du;
{
struct flist_head *entry;
struct disk_util *du;
+ bool do_json;
if (!disk_util_mutex)
return;
if (!disk_util_mutex)
return;
@@
-706,15
+708,17
@@
void show_disk_util(int terse, struct json_object *parent,
return;
}
return;
}
- if (output_format & FIO_OUTPUT_JSON)
- assert(parent);
+ if ((output_format & FIO_OUTPUT_JSON) && parent)
+ do_json = true;
+ else
+ do_json = false;
- if (!terse && !
(output_format & FIO_OUTPUT_JSON)
)
+ if (!terse && !
do_json
)
log_buf(out, "\nDisk stats (read/write):\n");
log_buf(out, "\nDisk stats (read/write):\n");
- if (
output_format & FIO_OUTPUT_JSON
)
+ if (
do_json
)
json_object_add_disk_utils(parent, &disk_list);
json_object_add_disk_utils(parent, &disk_list);
-
if (output_format & ~(FIO_OUTPUT_JSON
)) {
+
else if (output_format & ~(FIO_OUTPUT_JSON | FIO_OUTPUT_JSON_PLUS
)) {
flist_for_each(entry, &disk_list) {
du = flist_entry(entry, struct disk_util, list);
flist_for_each(entry, &disk_list) {
du = flist_entry(entry, struct disk_util, list);