Lines Matching refs:io_u
28 static void populate_hdr(struct thread_data *td, struct io_u *io_u,
52 struct io_u *io_u, unsigned long seed, int use_seed) in fill_verify_pattern() argument
62 io_u->rand_seed = fill_buffer(td, p, len); in fill_verify_pattern()
66 if (io_u->buf_filled_len >= len) { in fill_verify_pattern()
73 io_u->buf_filled_len = len; in fill_verify_pattern()
76 static unsigned int get_hdr_inc(struct thread_data *td, struct io_u *io_u) in get_hdr_inc() argument
80 hdr_inc = io_u->buflen; in get_hdr_inc()
81 if (td->o.verify_interval && td->o.verify_interval <= io_u->buflen) in get_hdr_inc()
87 static void fill_pattern_headers(struct thread_data *td, struct io_u *io_u, in fill_pattern_headers() argument
92 void *p = io_u->buf; in fill_pattern_headers()
94 fill_verify_pattern(td, p, io_u->buflen, io_u, seed, use_seed); in fill_pattern_headers()
96 hdr_inc = get_hdr_inc(td, io_u); in fill_pattern_headers()
98 for (; p < io_u->buf + io_u->buflen; p += hdr_inc) { in fill_pattern_headers()
100 populate_hdr(td, io_u, hdr, header_num, hdr_inc); in fill_pattern_headers()
201 struct io_u *io_u; member
271 struct io_u *io_u = vc->io_u; in dump_verify_buffers() local
273 struct io_u dummy; in dump_verify_buffers()
284 dump_buf(io_u->buf + hdr_offset, hdr->len, io_u->offset + hdr_offset, in dump_verify_buffers()
285 "received", vc->io_u->file); in dump_verify_buffers()
290 buf = malloc(io_u->buflen); in dump_verify_buffers()
291 dummy = *io_u; in dump_verify_buffers()
295 dummy.buflen = io_u->buflen; in dump_verify_buffers()
299 dump_buf(buf + hdr_offset, hdr->len, io_u->offset + hdr_offset, in dump_verify_buffers()
300 "expected", vc->io_u->file); in dump_verify_buffers()
308 offset = vc->io_u->offset; in log_verify_failure()
311 vc->name, vc->io_u->file->file_name, offset, hdr->len); in log_verify_failure()
328 return vc->io_u->buf + vc->hdr_num * hdr->len + hdr_size(hdr); in io_u_verify_off()
334 struct io_u *io_u = vc->io_u; in verify_io_u_pattern() local
344 len = get_hdr_inc(td, io_u) - header_size; in verify_io_u_pattern()
380 struct io_u *io_u = vc->io_u; in verify_io_u_meta() local
383 dprint(FD_VERIFY, "meta verify io_u %p, len %u\n", io_u, hdr->len); in verify_io_u_meta()
385 if (vh->offset == io_u->offset + vc->hdr_num * td->o.verify_interval) in verify_io_u_meta()
402 if (vh->numberio != io_u->numberio) in verify_io_u_meta()
420 dprint(FD_VERIFY, "xxhash verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_xxhash()
446 dprint(FD_VERIFY, "sha512 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_sha512()
471 dprint(FD_VERIFY, "sha256 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_sha256()
497 dprint(FD_VERIFY, "sha1 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_sha1()
520 dprint(FD_VERIFY, "crc7 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_crc7()
541 dprint(FD_VERIFY, "crc16 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_crc16()
562 dprint(FD_VERIFY, "crc64 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_crc64()
583 dprint(FD_VERIFY, "crc32 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_crc32()
604 dprint(FD_VERIFY, "crc32c verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_crc32c()
628 dprint(FD_VERIFY, "md5 verify io_u %p, len %u\n", vc->io_u, hdr->len); in verify_io_u_md5()
648 int verify_io_u_async(struct thread_data *td, struct io_u **io_u_ptr) in verify_io_u_async()
650 struct io_u *io_u = *io_u_ptr; in verify_io_u_async() local
654 if (io_u->file) in verify_io_u_async()
655 put_file_log(td, io_u->file); in verify_io_u_async()
657 if (io_u->flags & IO_U_F_IN_CUR_DEPTH) { in verify_io_u_async()
659 io_u->flags &= ~IO_U_F_IN_CUR_DEPTH; in verify_io_u_async()
661 flist_add_tail(&io_u->verify_list, &td->verify_list); in verify_io_u_async()
669 static int verify_trimmed_io_u(struct thread_data *td, struct io_u *io_u) in verify_trimmed_io_u() argument
679 len = io_u->buflen; in verify_trimmed_io_u()
680 p = io_u->buf; in verify_trimmed_io_u()
698 io_u->file->file_name, io_u->offset, io_u->buflen, in verify_trimmed_io_u()
699 (unsigned long) (p - io_u->buf)); in verify_trimmed_io_u()
703 static int verify_header(struct io_u *io_u, struct verify_header *hdr, in verify_header() argument
719 if (hdr->rand_seed != io_u->rand_seed) { in verify_header()
722 hdr->rand_seed, io_u->rand_seed); in verify_header()
736 io_u->file->file_name, in verify_header()
737 io_u->offset + hdr_num * hdr_len, hdr_len); in verify_header()
741 int verify_io_u(struct thread_data *td, struct io_u **io_u_ptr) in verify_io_u()
744 struct io_u *io_u = *io_u_ptr; in verify_io_u() local
749 if (td->o.verify == VERIFY_NULL || io_u->ddir != DDIR_READ) in verify_io_u()
758 if (io_u->flags & IO_U_F_TRIMMED) { in verify_io_u()
759 ret = verify_trimmed_io_u(td, io_u); in verify_io_u()
763 hdr_inc = get_hdr_inc(td, io_u); in verify_io_u()
766 for (p = io_u->buf; p < io_u->buf + io_u->buflen; in verify_io_u()
769 .io_u = io_u, in verify_io_u()
788 io_u->rand_seed = hdr->rand_seed; in verify_io_u()
790 ret = verify_header(io_u, hdr, hdr_num, hdr_inc); in verify_io_u()
855 struct io_u *io_u, unsigned int header_num) in fill_meta() argument
861 vh->time_sec = io_u->start_time.tv_sec; in fill_meta()
862 vh->time_usec = io_u->start_time.tv_usec; in fill_meta()
864 vh->numberio = io_u->numberio; in fill_meta()
866 vh->offset = io_u->offset + header_num * td->o.verify_interval; in fill_meta()
961 static void populate_hdr(struct thread_data *td, struct io_u *io_u, in populate_hdr() argument
973 hdr->rand_seed = io_u->rand_seed; in populate_hdr()
982 io_u, hdr->len); in populate_hdr()
987 io_u, hdr->len); in populate_hdr()
993 io_u, hdr->len); in populate_hdr()
998 io_u, hdr->len); in populate_hdr()
1003 io_u, hdr->len); in populate_hdr()
1008 io_u, hdr->len); in populate_hdr()
1013 io_u, hdr->len); in populate_hdr()
1018 io_u, hdr->len); in populate_hdr()
1023 io_u, hdr->len); in populate_hdr()
1028 io_u, hdr->len); in populate_hdr()
1029 fill_meta(hdr, td, io_u, header_num); in populate_hdr()
1033 io_u, hdr->len); in populate_hdr()
1051 void populate_verify_io_u(struct thread_data *td, struct io_u *io_u) in populate_verify_io_u() argument
1056 io_u->numberio = td->io_issues[io_u->ddir]; in populate_verify_io_u()
1058 fill_pattern_headers(td, io_u, 0, 0); in populate_verify_io_u()
1061 int get_next_verify(struct thread_data *td, struct io_u *io_u) in get_next_verify() argument
1068 if (io_u->file) in get_next_verify()
1104 io_u->offset = ipo->offset; in get_next_verify()
1105 io_u->buflen = ipo->len; in get_next_verify()
1106 io_u->numberio = ipo->numberio; in get_next_verify()
1107 io_u->file = ipo->file; in get_next_verify()
1108 io_u->flags |= IO_U_F_VER_LIST; in get_next_verify()
1111 io_u->flags |= IO_U_F_TRIMMED; in get_next_verify()
1113 if (!fio_file_open(io_u->file)) { in get_next_verify()
1114 int r = td_io_open_file(td, io_u->file); in get_next_verify()
1118 io_u->file->file_name); in get_next_verify()
1124 assert(fio_file_open(io_u->file)); in get_next_verify()
1125 io_u->ddir = DDIR_READ; in get_next_verify()
1126 io_u->xfer_buf = io_u->buf; in get_next_verify()
1127 io_u->xfer_buflen = io_u->buflen; in get_next_verify()
1131 dprint(FD_VERIFY, "get_next_verify: ret io_u %p\n", io_u); in get_next_verify()
1134 io_u->rand_seed = __rand(&td->verify_state); in get_next_verify()
1136 io_u->rand_seed *= __rand(&td->verify_state); in get_next_verify()
1157 struct io_u *io_u; in verify_async_thread() local
1192 io_u = flist_first_entry(&list, struct io_u, verify_list); in verify_async_thread()
1193 flist_del_init(&io_u->verify_list); in verify_async_thread()
1195 io_u->flags |= IO_U_F_NO_FILE_PUT; in verify_async_thread()
1196 ret = verify_io_u(td, &io_u); in verify_async_thread()
1198 put_io_u(td, io_u); in verify_async_thread()
1540 int verify_state_should_stop(struct thread_data *td, struct io_u *io_u) in verify_state_should_stop() argument
1563 if (io_u->offset == s->offsets[i]) in verify_state_should_stop()