solaris: OpenSolaris already has the madvise advice defined
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 9d9027d792e4ccbb8cd4f6469b89b88ed210b6e0..e205b3aa52ac9f9a693fd249c52de1b84f45afb8 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -146,13 +146,9 @@ static void *disk_thread_main(void *data)
 
 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;
@@ -501,7 +497,6 @@ static void do_verify(struct thread_data *td)
                                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
@@ -519,6 +514,7 @@ static void do_verify(struct thread_data *td)
                                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;
 
@@ -1501,14 +1497,14 @@ static void run_threads(void)
                        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);
                        }