projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fio 2.0.4
[fio.git]
/
backend.c
diff --git
a/backend.c
b/backend.c
index e567ad5e1e8e4f0f78986c26ba6550013116a7e6..52791040ff21384d283b2a09de3ff9718e19d866 100644
(file)
--- a/
backend.c
+++ b/
backend.c
@@
-30,6
+30,7
@@
#include <locale.h>
#include <assert.h>
#include <time.h>
#include <locale.h>
#include <assert.h>
#include <time.h>
+#include <inttypes.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/ipc.h>
@@
-67,7
+68,7
@@
int temp_stall_ts;
unsigned long done_secs = 0;
#define PAGE_ALIGN(buf) \
unsigned long done_secs = 0;
#define PAGE_ALIGN(buf) \
- (char *) (((u
nsigned long
) (buf) + page_mask) & ~page_mask)
+ (char *) (((u
intptr_t
) (buf) + page_mask) & ~page_mask)
#define JOB_START_TIMEOUT (5 * 1000)
#define JOB_START_TIMEOUT (5 * 1000)
@@
-408,6
+409,9
@@
static void do_verify(struct thread_data *td)
}
}
}
}
+ if (flow_threshold_exceeded(td))
+ continue;
+
io_u = __get_io_u(td);
if (!io_u)
break;
io_u = __get_io_u(td);
if (!io_u)
break;
@@
-559,6
+563,9
@@
static void do_io(struct thread_data *td)
}
}
}
}
+ if (flow_threshold_exceeded(td))
+ continue;
+
io_u = get_io_u(td);
if (!io_u)
break;
io_u = get_io_u(td);
if (!io_u)
break;
@@
-1019,7
+1026,8
@@
static void *thread_main(void *data)
if (td->o.cgroup_weight && cgroup_setup(td, cgroup_list, &cgroup_mnt))
goto err;
if (td->o.cgroup_weight && cgroup_setup(td, cgroup_list, &cgroup_mnt))
goto err;
- if (nice(td->o.nice) == -1) {
+ errno = 0;
+ if (nice(td->o.nice) == -1 && errno != 0) {
td_verror(td, errno, "nice");
goto err;
}
td_verror(td, errno, "nice");
goto err;
}
@@
-1178,7
+1186,7
@@
err:
write_iolog_close(td);
td_set_runstate(td, TD_EXITED);
write_iolog_close(td);
td_set_runstate(td, TD_EXITED);
- return (void *) (u
nsigned long
) td->error;
+ return (void *) (u
intptr_t
) td->error;
}
}
@@
-1209,7
+1217,7
@@
static int fork_main(int shmid, int offset)
td = data + offset * sizeof(struct thread_data);
ret = thread_main(td);
shmdt(data);
td = data + offset * sizeof(struct thread_data);
ret = thread_main(td);
shmdt(data);
- return (int) (u
nsigned long
) ret;
+ return (int) (u
intptr_t
) ret;
}
/*
}
/*