verify: dump the received buffer when zero verify fails

verify_zero() logs the file, offset and length of a mismatch, but unlike
the header and pattern verify paths it never writes out the data it read.
That makes trim_verify_zero and write zeroes verify failures harder to
analyze than a regular verify failure, where verify_dump=1 leaves the
offending block on disk for inspection.

Dump the received block from verify_zero() when verify_dump is set, so
that both callers benefit. There is no point in also dumping an expected
buffer, as the expected contents are all zeroes.

Signed-off-by: Sarthak Killedar <sarthak.killedar@gmail.com>
1 file changed