verify: use 'cmp_pattern' from 'lib/pattern.c' to compare pattern and buffer
authorRoman Pen <r.peniaev@gmail.com>
Wed, 19 Aug 2015 10:33:09 +0000 (12:33 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 4 Sep 2015 19:33:06 +0000 (13:33 -0600)
commit25276497ccd2b9578a52fceb02d6cf62dc509b52
treefead8f7fc088f5b835c0fd1d41b9047b575c5a4b
parent2cac8fcb5ecaf5de549c36ee1cc2db75f00f8ff4
verify: use 'cmp_pattern' from 'lib/pattern.c' to compare pattern and buffer

'cmp_pattern' function should be faster, since it does not use loops
and while doing 'memcmp' the same CPU cache line is used.

Keep in mind, that now single-byte pattern becomes the string of 512 bytes.
In that case this optimization will not work as expected, since 'memcmp'
will be called twice for the whole pattern, but in next patches this
behaviour will be avoided and single-byte pattern will stay single-byte
pattern without any attempt to duplicate it.

Also print buffer and pattern bytes as unsigned chars.

Signed-off-by: Roman Pen <r.peniaev@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
verify.c