projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increase CPU clock calibration accuracy
[fio.git]
/
verify.c
diff --git
a/verify.c
b/verify.c
index 6dd7f6a0285df0613d15d6590f9a604e90cd6b49..c0485d55bf268563a5bc760bede3333f7a58e8e6 100644
(file)
--- a/
verify.c
+++ b/
verify.c
@@
-690,6
+690,7
@@
int verify_io_u(struct thread_data *td, struct io_u *io_u)
.hdr_num = hdr_num,
.td = td,
};
.hdr_num = hdr_num,
.td = td,
};
+ unsigned int verify_type;
if (ret && td->o.verify_fatal)
break;
if (ret && td->o.verify_fatal)
break;
@@
-708,7
+709,12
@@
int verify_io_u(struct thread_data *td, struct io_u *io_u)
return EILSEQ;
}
return EILSEQ;
}
- switch (hdr->verify_type) {
+ if (td->o.verify != VERIFY_NONE)
+ verify_type = td->o.verify;
+ else
+ verify_type = hdr->verify_type;
+
+ switch (verify_type) {
case VERIFY_MD5:
ret = verify_io_u_md5(hdr, &vc);
break;
case VERIFY_MD5:
ret = verify_io_u_md5(hdr, &vc);
break;
@@
-747,6
+753,10
@@
int verify_io_u(struct thread_data *td, struct io_u *io_u)
log_err("Bad verify type %u\n", hdr->verify_type);
ret = EINVAL;
}
log_err("Bad verify type %u\n", hdr->verify_type);
ret = EINVAL;
}
+
+ if (ret && verify_type != hdr->verify_type)
+ log_err("fio: verify type mismatch (%u media, %u given)\n",
+ hdr->verify_type, verify_type);
}
done:
}
done:
@@
-973,6
+983,7
@@
int get_next_verify(struct thread_data *td, struct io_u *io_u)
io_u->offset = ipo->offset;
io_u->buflen = ipo->len;
io_u->file = ipo->file;
io_u->offset = ipo->offset;
io_u->buflen = ipo->len;
io_u->file = ipo->file;
+ io_u->flags |= IO_U_F_VER_LIST;
if (ipo->flags & IP_F_TRIMMED)
io_u->flags |= IO_U_F_TRIMMED;
if (ipo->flags & IP_F_TRIMMED)
io_u->flags |= IO_U_F_TRIMMED;
@@
-1048,8
+1059,7
@@
static void *verify_async_thread(void *data)
put_io_u(td, io_u);
if (!ret)
continue;
put_io_u(td, io_u);
if (!ret)
continue;
- if (td->o.continue_on_error & ERROR_TYPE_VERIFY &&
- td_non_fatal_error(ret)) {
+ if (td_non_fatal_error(td, ERROR_TYPE_VERIFY_BIT, ret)) {
update_error_count(td, ret);
td_clear_error(td);
ret = 0;
update_error_count(td, ret);
td_clear_error(td);
ret = 0;