(void)cpy_pattern(td->o.buffer_pattern, td->o.buffer_pattern_bytes, p, len);
}
-void __fill_buffer(struct thread_options *o, unsigned long seed, void *p,
- unsigned int len)
+static void __fill_buffer(struct thread_options *o, unsigned long seed, void *p,
+ unsigned int len)
{
__fill_random_buf_percentage(seed, p, o->compress_percentage, len, len, o->buffer_pattern, o->buffer_pattern_bytes);
}
-unsigned long fill_buffer(struct thread_data *td, void *p, unsigned int len)
+static unsigned long fill_buffer(struct thread_data *td, void *p,
+ unsigned int len)
{
struct frand_state *fs = &td->verify_state;
struct thread_options *o = &td->o;
if (io_u->flags & IO_U_F_IN_CUR_DEPTH) {
td->cur_depth--;
- io_u_clear(io_u, IO_U_F_IN_CUR_DEPTH);
+ io_u_clear(td, io_u, IO_U_F_IN_CUR_DEPTH);
}
flist_add_tail(&io_u->verify_list, &td->verify_list);
*io_u_ptr = NULL;
* If the IO engine is faking IO (like null), then just pretend
* we verified everything.
*/
- if (td->io_ops->flags & FIO_FAKEIO)
+ if (td_ioengine_flagged(td, FIO_FAKEIO))
return 0;
if (io_u->flags & IO_U_F_TRIMMED) {
io_u->buflen = ipo->len;
io_u->numberio = ipo->numberio;
io_u->file = ipo->file;
- io_u_set(io_u, IO_U_F_VER_LIST);
+ io_u_set(td, io_u, IO_U_F_VER_LIST);
if (ipo->flags & IP_F_TRIMMED)
- io_u_set(io_u, IO_U_F_TRIMMED);
+ io_u_set(td, io_u, IO_U_F_TRIMMED);
if (!fio_file_open(io_u->file)) {
int r = td_io_open_file(td, io_u->file);
io_u = flist_first_entry(&list, struct io_u, verify_list);
flist_del_init(&io_u->verify_list);
- io_u_set(io_u, IO_U_F_NO_FILE_PUT);
+ io_u_set(td, io_u, IO_U_F_NO_FILE_PUT);
ret = verify_io_u(td, &io_u);
put_io_u(td, io_u);
pthread_attr_t attr;
pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
+ pthread_attr_setstacksize(&attr, 2 * PTHREAD_STACK_MIN);
td->verify_thread_exit = 0;
static int open_state_file(const char *name, const char *prefix, int num,
int for_write)
{
- char out[64];
+ char out[PATH_MAX];
int flags;
int fd;
fd = open(out, flags, 0644);
if (fd == -1) {
perror("fio: open state file");
+ log_err("fio: state file: %s (for_write=%d)\n", out, for_write);
return -1;
}