engines/libblkio: Add option libblkio_vectored
[fio.git] / thread_options.h
index 634070af00eca3f9cfc3b5ed7e669b1ff240a7ad..74e7ea45868b50a8701079fa99d23e81d7a2ab9f 100644 (file)
@@ -144,7 +144,7 @@ struct thread_options {
        unsigned int do_verify;
        unsigned int verify_interval;
        unsigned int verify_offset;
-       char verify_pattern[MAX_PATTERN_SIZE];
+       char *verify_pattern;
        unsigned int verify_pattern_bytes;
        struct pattern_fmt verify_fmt[8];
        unsigned int verify_fmt_sz;
@@ -256,7 +256,7 @@ struct thread_options {
        unsigned int zero_buffers;
        unsigned int refill_buffers;
        unsigned int scramble_buffers;
-       char buffer_pattern[MAX_PATTERN_SIZE];
+       char *buffer_pattern;
        unsigned int buffer_pattern_bytes;
        unsigned int compress_percentage;
        unsigned int compress_chunk;
@@ -464,7 +464,6 @@ struct thread_options_pack {
        uint32_t do_verify;
        uint32_t verify_interval;
        uint32_t verify_offset;
-       uint8_t verify_pattern[MAX_PATTERN_SIZE];
        uint32_t verify_pattern_bytes;
        uint32_t verify_fatal;
        uint32_t verify_dump;
@@ -572,7 +571,6 @@ struct thread_options_pack {
        uint32_t zero_buffers;
        uint32_t refill_buffers;
        uint32_t scramble_buffers;
-       uint8_t buffer_pattern[MAX_PATTERN_SIZE];
        uint32_t buffer_pattern_bytes;
        uint32_t compress_percentage;
        uint32_t compress_chunk;
@@ -699,9 +697,16 @@ struct thread_options_pack {
 
        uint32_t log_entries;
        uint32_t log_prio;
+
+       /*
+        * verify_pattern followed by buffer_pattern from the unpacked struct
+        */
+       uint8_t patterns[];
 } __attribute__((packed));
 
-extern void convert_thread_options_to_cpu(struct thread_options *o, struct thread_options_pack *top);
+extern int convert_thread_options_to_cpu(struct thread_options *o,
+               struct thread_options_pack *top, size_t top_sz);
+extern size_t thread_options_pack_size(struct thread_options *o);
 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);