static int create_disk_util_thread(void)
{
- pthread_attr_t attr;
int ret;
- pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
- ret = pthread_create(&disk_util_thread, &attr, disk_thread_main, NULL);
- pthread_attr_destroy(&attr);
+ ret = pthread_create(&disk_util_thread, NULL, disk_thread_main, NULL);
if (ret) {
log_err("Can't create disk util thread: %s\n", strerror(ret));
return 1;
clear_io_u(td, io_u);
} else if (io_u->resid) {
int bytes = io_u->xfer_buflen - io_u->resid;
- struct fio_file *f = io_u->file;
/*
* zero read, fail
if (ddir_rw(io_u->ddir))
td->ts.short_io_u[io_u->ddir]++;
+ f = io_u->file;
if (io_u->offset == f->real_file_size)
goto sync_done;
todo--;
} else {
struct fio_file *f;
- unsigned int i;
+ unsigned int j;
/*
* for sharing to work, each job must always open
* its own files. so close them, if we opened them
* for creation
*/
- for_each_file(td, f, i) {
+ for_each_file(td, f, j) {
if (fio_file_open(f))
td_io_close_file(td, f);
}