int i;
for (i = 0; i < len; i++)
- fprintf(f_out, "%02x", p[i]);
- fprintf(f_out, "\n");
+ log_info("%02x", p[i]);
+ log_info("\n");
}
static int verify_io_u_crc32(struct verify_header *hdr, struct io_u *io_u)
p += sizeof(hdr);
fill_random_bytes(td, p, io_u->buflen - sizeof(hdr));
- if (td->verify == VERIFY_MD5) {
+ if (td->o.verify == VERIFY_MD5) {
fill_md5(&hdr, p, io_u->buflen - sizeof(hdr));
hdr.verify_type = VERIFY_MD5;
} else {
int get_next_verify(struct thread_data *td, struct io_u *io_u)
{
struct io_piece *ipo;
+ struct rb_node *n;
/*
* this io_u is from a requeue, we already filled the offsets
if (io_u->file)
return 0;
- if (!list_empty(&td->io_hist_list)) {
- ipo = list_entry(td->io_hist_list.next, struct io_piece, list);
+ n = rb_first(&td->io_hist_tree);
+ if (n) {
+ ipo = rb_entry(n, struct io_piece, rb_node);
- list_del(&ipo->list);
+ rb_erase(n, &td->io_hist_tree);
io_u->offset = ipo->offset;
io_u->buflen = ipo->len;