gfio: fill default options on new job
authorJens Axboe <axboe@kernel.dk>
Mon, 19 Mar 2012 19:37:41 +0000 (20:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Mar 2012 19:37:41 +0000 (20:37 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
gfio.c
init.c
thread_options.h

diff --git a/gfio.c b/gfio.c
index 827133e1bb7675c8a1bb4545f13897172ea4ac51..d62b8a5b5086648dc3a9e8177764eefdfea3c29e 100644 (file)
--- a/gfio.c
+++ b/gfio.c
@@ -2070,6 +2070,7 @@ static void gfio_client_added(struct gui_entry *ge, struct fio_client *client)
 
        gc = malloc(sizeof(*gc));
        memset(gc, 0, sizeof(*gc));
 
        gc = malloc(sizeof(*gc));
        memset(gc, 0, sizeof(*gc));
+       options_default_fill(&gc->o);
        gc->ge = ge;
        gc->client = fio_get_client(client);
 
        gc->ge = ge;
        gc->client = fio_get_client(client);
 
diff --git a/init.c b/init.c
index eccd3afedd87af446fd2de017234eba9667de2c9..0f992803729c92aac6844f89b6c220f5b3380f37 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1708,3 +1708,8 @@ int parse_options(int argc, char *argv[])
 
        return 0;
 }
 
        return 0;
 }
+
+void options_default_fill(struct thread_options *o)
+{
+       memcpy(o, &def_thread.o, sizeof(*o));
+}
index 6a8fee72ad3fc5180a5e973a1816750865e27fe5..51ac0908a2c3c1dccaebd549cd74c593b3fe2aa6 100644 (file)
@@ -415,5 +415,6 @@ struct thread_options_pack {
 extern void convert_thread_options_to_cpu(struct thread_options *o, struct thread_options_pack *top);
 extern void convert_thread_options_to_net(struct thread_options_pack *top, struct thread_options *);
 extern int fio_test_cconv(struct thread_options *);
 extern void convert_thread_options_to_cpu(struct thread_options *o, struct thread_options_pack *top);
 extern void convert_thread_options_to_net(struct thread_options_pack *top, struct thread_options *);
 extern int fio_test_cconv(struct thread_options *);
+extern void options_default_fill(struct thread_options *o);
 
 #endif
 
 #endif