projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nanosecond: initial commit changing timeval to timespec
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index 80096bf8a81a7bc652fab31fc146dca24718d6e7..42ccbef0e42271196e1acabffe1c9ed2cc32909c 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-48,7
+48,7
@@
struct client_ops fio_client_ops = {
.client_type = FIO_CLIENT_TYPE_CLI,
};
.client_type = FIO_CLIENT_TYPE_CLI,
};
-static struct time
val eta_tv
;
+static struct time
spec eta_ts
;
static FLIST_HEAD(client_list);
static FLIST_HEAD(eta_list);
static FLIST_HEAD(client_list);
static FLIST_HEAD(eta_list);
@@
-1869,7
+1869,7
@@
static int handle_cmd_timeout(struct fio_client *client,
}
static int client_check_cmd_timeout(struct fio_client *client,
}
static int client_check_cmd_timeout(struct fio_client *client,
- struct time
val
*now)
+ struct time
spec
*now)
{
struct fio_net_cmd_reply *reply;
struct flist_head *entry, *tmp;
{
struct fio_net_cmd_reply *reply;
struct flist_head *entry, *tmp;
@@
-1878,7
+1878,7
@@
static int client_check_cmd_timeout(struct fio_client *client,
flist_for_each_safe(entry, tmp, &client->cmd_list) {
reply = flist_entry(entry, struct fio_net_cmd_reply, list);
flist_for_each_safe(entry, tmp, &client->cmd_list) {
reply = flist_entry(entry, struct fio_net_cmd_reply, list);
- if (mtime_since(&reply->t
v
, now) < FIO_NET_CLIENT_TIMEOUT)
+ if (mtime_since(&reply->t
s
, now) < FIO_NET_CLIENT_TIMEOUT)
continue;
if (!handle_cmd_timeout(client, reply))
continue;
if (!handle_cmd_timeout(client, reply))
@@
-1896,10
+1896,10
@@
static int fio_check_clients_timed_out(void)
{
struct fio_client *client;
struct flist_head *entry, *tmp;
{
struct fio_client *client;
struct flist_head *entry, *tmp;
- struct time
val tv
;
+ struct time
spec ts
;
int ret = 0;
int ret = 0;
- fio_gettime(&t
v
, NULL);
+ fio_gettime(&t
s
, NULL);
flist_for_each_safe(entry, tmp, &client_list) {
client = flist_entry(entry, struct fio_client, list);
flist_for_each_safe(entry, tmp, &client_list) {
client = flist_entry(entry, struct fio_client, list);
@@
-1907,7
+1907,7
@@
static int fio_check_clients_timed_out(void)
if (flist_empty(&client->cmd_list))
continue;
if (flist_empty(&client->cmd_list))
continue;
- if (!client_check_cmd_timeout(client, &t
v
))
+ if (!client_check_cmd_timeout(client, &t
s
))
continue;
if (client->ops->timed_out)
continue;
if (client->ops->timed_out)
@@
-1928,7
+1928,7
@@
int fio_handle_clients(struct client_ops *ops)
struct pollfd *pfds;
int i, ret = 0, retval = 0;
struct pollfd *pfds;
int i, ret = 0, retval = 0;
- fio_gettime(&eta_t
v
, NULL);
+ fio_gettime(&eta_t
s
, NULL);
pfds = malloc(nr_clients * sizeof(struct pollfd));
pfds = malloc(nr_clients * sizeof(struct pollfd));
@@
-1960,13
+1960,13
@@
int fio_handle_clients(struct client_ops *ops)
assert(i == nr_clients);
do {
assert(i == nr_clients);
do {
- struct time
val tv
;
+ struct time
spec ts
;
int timeout;
int timeout;
- fio_gettime(&t
v
, NULL);
- if (mtime_since(&eta_t
v, &tv
) >= 900) {
+ fio_gettime(&t
s
, NULL);
+ if (mtime_since(&eta_t
s, &ts
) >= 900) {
request_client_etas(ops);
request_client_etas(ops);
- memcpy(&eta_t
v, &tv, sizeof(tv
));
+ memcpy(&eta_t
s, &ts, sizeof(ts
));
if (fio_check_clients_timed_out())
break;
if (fio_check_clients_timed_out())
break;