+ *pattern_bytes = i;
+ return 0;
+}
+
+static int str_buffer_pattern_cb(void *data, const char *input)
+{
+ struct thread_data *td = data;
+ int ret;
+
+ ret = pattern_cb(td->o.buffer_pattern, MAX_PATTERN_SIZE, input,
+ &td->o.buffer_pattern_bytes);
+
+ if (!ret) {
+ td->o.refill_buffers = 0;
+ td->o.scramble_buffers = 0;
+ td->o.zero_buffers = 0;
+ }
+
+ return ret;
+}
+
+static int str_buffer_compress_cb(void *data, unsigned long long *il)
+{
+ struct thread_data *td = data;
+
+ td->flags |= TD_F_COMPRESS;
+ td->o.compress_percentage = *il;
+ return 0;
+}
+
+static int str_verify_pattern_cb(void *data, const char *input)
+{
+ struct thread_data *td = data;
+ int ret;
+
+ ret = pattern_cb(td->o.verify_pattern, MAX_PATTERN_SIZE, input,
+ &td->o.verify_pattern_bytes);