summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-01-14 20:51:37 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-01-14 20:51:37 +0100
commitc7e6ae4eb46c4e294df85ee4f7dc4c71d458daad (patch)
tree415a0a09978e88f07c2285d7eb9ae67c7d42503c
parente61f1ec89de8eb5bb0f8b1e6a79594f0bff2a259 (diff)
downloadfio-c7e6ae4eb46c4e294df85ee4f7dc4c71d458daad.tar.gz
fio-c7e6ae4eb46c4e294df85ee4f7dc4c71d458daad.tar.bz2
Cleanup some verify bits
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r--verify.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/verify.c b/verify.c
index a7344e32..66b3ef0d 100644
--- a/verify.c
+++ b/verify.c
@@ -553,14 +553,14 @@ int verify_io_u_pattern(struct verify_header *hdr, struct vcont *vc)
{
struct thread_data *td = vc->td;
struct io_u *io_u = vc->io_u;
- char *pattern = td->o.verify_pattern;
- unsigned long pattern_size = td->o.verify_pattern_bytes;
+ char *buf, *pattern;
unsigned int hdr_size = __hdr_size(td->o.verify);
- char *buf = (void *) hdr + hdr_size;
- unsigned int hdr_inc = get_hdr_inc(td, io_u);
- unsigned int len = hdr_inc - hdr_size;
- unsigned int mod = hdr_size % pattern_size;
- unsigned int i;
+ unsigned int len, mod, i;
+
+ pattern = td->o.verify_pattern;
+ buf = (void *) hdr + hdr_size;
+ len = get_hdr_inc(td, io_u) - hdr_size;
+ mod = hdr_size % td->o.verify_pattern_bytes;
for (i = 0; i < len; i++) {
if (buf[i] != pattern[mod]) {
@@ -574,7 +574,7 @@ int verify_io_u_pattern(struct verify_header *hdr, struct vcont *vc)
return EILSEQ;
}
mod++;
- if (mod == pattern_size)
+ if (mod == td->o.verify_pattern_bytes)
mod = 0;
}