Pass in client for thread/group status op
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/client.c b/client.c
index 23c5b6c..a65cbcb 100644
--- a/client.c
+++ b/client.c
@@ -22,8 +22,8 @@
#include "hash.h"
static void handle_du(struct fio_client *client, struct fio_net_cmd *cmd);
-static void handle_ts(struct fio_net_cmd *cmd);
-static void handle_gs(struct fio_net_cmd *cmd);
+static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd);
+static void handle_gs(struct fio_client *client, struct fio_net_cmd *cmd);
static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd);
static void handle_text(struct fio_client *client, struct fio_net_cmd *cmd);
@@ -621,7 +621,7 @@
dst->groupid = le32_to_cpu(src->groupid);
}
-static void handle_ts(struct fio_net_cmd *cmd)
+static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd)
{
struct cmd_ts_pdu *p = (struct cmd_ts_pdu *) cmd->payload;
@@ -642,7 +642,7 @@
}
}
-static void handle_gs(struct fio_net_cmd *cmd)
+static void handle_gs(struct fio_client *client, struct fio_net_cmd *cmd)
{
struct group_run_stats *gs = (struct group_run_stats *) cmd->payload;
@@ -899,7 +899,7 @@
convert_ts(&p->ts, &p->ts);
convert_gs(&p->rs, &p->rs);
- ops->thread_status(cmd);
+ ops->thread_status(client, cmd);
free(cmd);
break;
}
@@ -908,7 +908,7 @@
convert_gs(gs, gs);
- ops->group_stats(cmd);
+ ops->group_stats(client, cmd);
free(cmd);
break;
}
diff --git a/client.h b/client.h
index e7a1d83..d0f9b28 100644
--- a/client.h
+++ b/client.h
@@ -50,8 +50,8 @@
typedef void (*client_text_op_func)(struct fio_client *client, struct fio_net_cmd *cmd);
typedef void (*client_disk_util_op_func)(struct fio_client *client, struct fio_net_cmd *cmd);
-typedef void (*client_thread_status_op)(struct fio_net_cmd *cmd);
-typedef void (*client_group_stats_op)(struct fio_net_cmd *cmd);
+typedef void (*client_thread_status_op)(struct fio_client *client, struct fio_net_cmd *cmd);
+typedef void (*client_group_stats_op)(struct fio_client *client, struct fio_net_cmd *cmd);
typedef void (*client_eta_op)(struct jobs_eta *je);
typedef void (*client_probe_op)(struct fio_client *client, struct fio_net_cmd *cmd);
typedef void (*client_thread_status_display_op)(char *status_message, double perc);
diff --git a/gfio.c b/gfio.c
index 157dd66..ebfa4b9 100644
--- a/gfio.c
+++ b/gfio.c
@@ -154,16 +154,18 @@
fio_client_ops.disk_util(client, cmd);
}
-static void gfio_thread_status_op(struct fio_net_cmd *cmd)
+static void gfio_thread_status_op(struct fio_client *client,
+ struct fio_net_cmd *cmd)
{
printf("gfio_thread_status_op called\n");
- fio_client_ops.thread_status(cmd);
+ fio_client_ops.thread_status(client, cmd);
}
-static void gfio_group_stats_op(struct fio_net_cmd *cmd)
+static void gfio_group_stats_op(struct fio_client *client,
+ struct fio_net_cmd *cmd)
{
printf("gfio_group_stats_op called\n");
- fio_client_ops.group_stats(cmd);
+ fio_client_ops.group_stats(client, cmd);
}
static void gfio_update_eta(struct jobs_eta *je)