+void fill_buffer_pattern(struct thread_data *td, void *p, unsigned int len)
+{
+ fill_pattern(td, p, len, td->o.buffer_pattern, td->o.buffer_pattern_bytes);
+}
+
+void fill_verify_pattern(struct thread_data *td, void *p, unsigned int len,
+ struct io_u *io_u, unsigned long seed, int use_seed)
+{
+ if (!td->o.verify_pattern_bytes) {
+ dprint(FD_VERIFY, "fill random bytes len=%u\n", len);
+
+ if (use_seed)
+ __fill_random_buf(p, len, seed);
+ else
+ io_u->rand_seed = fill_random_buf(&td->__verify_state, p, len);
+ return;
+ }
+
+ if (io_u->buf_filled_len >= len) {
+ dprint(FD_VERIFY, "using already filled verify pattern b=%d len=%u\n",
+ td->o.verify_pattern_bytes, len);
+ return;
+ }
+
+ fill_pattern(td, p, len, td->o.verify_pattern, td->o.verify_pattern_bytes);
+
+ io_u->buf_filled_len = len;
+}
+