[PATCH cpu io threads need not have lots of stuff setup
[fio.git] / init.c
diff --git a/init.c b/init.c
index f27fdf1f03f5bfeb9a85aa690670d1cd2e2d2fda..b0c35f1041ff454ece3dc8b6437ccb1a311426ef 100644 (file)
--- a/init.c
+++ b/init.c
@@ -604,6 +604,9 @@ int init_random_state(struct thread_data *td)
        int fd, num_maps, blocks, i;
        struct fio_file *f;
 
+       if (td->io_ops->flags & FIO_CPUIO)
+               return 0;
+
        fd = open("/dev/urandom", O_RDONLY);
        if (fd == -1) {
                td_verror(td, errno);