X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=diskutil.h;h=8623fd723b723053c59337984208c5c7f3f57a8e;hb=d2aeedb9e61548162681715b3befc27e3f6c7e10;hp=b2231502c62dca0232e8cd1a2111fe2665e296eb;hpb=d79db1222039e906dd49ae290daa59701f4e2385;p=fio.git diff --git a/diskutil.h b/diskutil.h index b2231502..8623fd72 100644 --- a/diskutil.h +++ b/diskutil.h @@ -3,11 +3,9 @@ #include "json.h" #define FIO_DU_NAME_SZ 64 -/* - * Disk utils as read in /sys/block//stat - */ -struct disk_util_stat { - uint8_t name[FIO_DU_NAME_SZ]; +extern volatile int helper_exit; + +struct disk_util_stats { uint32_t ios[2]; uint32_t merges[2]; uint64_t sectors[2]; @@ -17,6 +15,14 @@ struct disk_util_stat { uint64_t msec; }; +/* + * Disk utils as read in /sys/block//stat + */ +struct disk_util_stat { + uint8_t name[FIO_DU_NAME_SZ]; + struct disk_util_stats s; +}; + struct disk_util_agg { uint32_t ios[2]; uint32_t merges[2]; @@ -40,7 +46,7 @@ struct disk_util { char *name; char *sysfs_root; - char path[256]; + char path[PATH_MAX]; int major, minor; struct disk_util_stat dus; @@ -94,27 +100,32 @@ static inline void disk_util_dec(struct disk_util *du) extern struct flist_head disk_list; -extern void wait_for_disk_thread_exit(void); - /* * disk util stuff */ #ifdef FIO_HAVE_DISK_UTIL extern void print_disk_util(struct disk_util_stat *, struct disk_util_agg *, int terse); extern void show_disk_util(int terse, struct json_object *parent); -extern void free_disk_util(void); +extern void json_array_add_disk_util(struct disk_util_stat *dus, + struct disk_util_agg *agg, struct json_array *parent); extern void init_disk_util(struct thread_data *); extern int update_io_ticks(void); extern void setup_disk_util(void); +extern void disk_util_prune_entries(void); #else -#define print_disk_util(dus, agg, terse) +static inline void print_disk_util(struct disk_util_stat *du, + struct disk_util_agg *agg, int terse) +{ +} #define show_disk_util(terse, parent) -#define free_disk_util() +#define disk_util_prune_entries() #define init_disk_util(td) #define setup_disk_util() +#define json_array_add_disk_util(dus, agg, parent) + static inline int update_io_ticks(void) { - return 0; + return helper_exit; } #endif