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
tree: be0cfedf6ce05370cb88675750cfd27ec985b658
  1. .github/
  2. arch/
  3. ci/
  4. compiler/
  5. crc/
  6. doc/
  7. engines/
  8. examples/
  9. exp/
  10. lib/
  11. mock-tests/
  12. os/
  13. oslib/
  14. profiles/
  15. t/
  16. tools/
  17. unittests/
  18. .gitignore
  19. .readthedocs.yaml
  20. backend.c
  21. blktrace.c
  22. blktrace.h
  23. blktrace_api.h
  24. cairo_text_helpers.c
  25. cairo_text_helpers.h
  26. cconv.c
  27. cgroup.c
  28. cgroup.h
  29. CITATION.cff
  30. client.c
  31. client.h
  32. configure
  33. COPYING
  34. dataplacement.c
  35. dataplacement.h
  36. debug.c
  37. debug.h
  38. DEDUPE-TODO
  39. dedupe.c
  40. dedupe.h
  41. diskutil.c
  42. diskutil.h
  43. err.h
  44. eta.c
  45. fifo.c
  46. fifo.h
  47. file.h
  48. filehash.c
  49. filehash.h
  50. filelock.c
  51. filelock.h
  52. filesetup.c
  53. FIO-VERSION-GEN
  54. fio.1
  55. fio.c
  56. fio.h
  57. fio_sem.c
  58. fio_sem.h
  59. fio_shared_sem.c
  60. fio_time.h
  61. flist.h
  62. flow.c
  63. flow.h
  64. gclient.c
  65. gclient.h
  66. gcompat.c
  67. gcompat.h
  68. gerror.c
  69. gerror.h
  70. gettime-thread.c
  71. gettime.c
  72. gettime.h
  73. GFIO-TODO
  74. gfio.c
  75. gfio.h
  76. ghelpers.c
  77. ghelpers.h
  78. goptions.c
  79. goptions.h
  80. graph.c
  81. graph.h
  82. hash.h
  83. helper_thread.c
  84. helper_thread.h
  85. helpers.c
  86. helpers.h
  87. HOWTO.rst
  88. idletime.c
  89. idletime.h
  90. init.c
  91. io_ddir.h
  92. io_u.c
  93. io_u.h
  94. io_u_queue.c
  95. io_u_queue.h
  96. ioengines.c
  97. ioengines.h
  98. iolog.c
  99. iolog.h
  100. json.c
  101. json.h
  102. libfio.c
  103. log.c
  104. log.h
  105. Makefile
  106. memory.c
  107. minmax.h
  108. MORAL-LICENSE
  109. optgroup.c
  110. optgroup.h
  111. options.c
  112. options.h
  113. parse.c
  114. parse.h
  115. pcbuf.h
  116. printing.c
  117. printing.h
  118. profile.c
  119. profile.h
  120. pshared.c
  121. pshared.h
  122. rate-submit.c
  123. rate-submit.h
  124. README.rst
  125. REPORTING-BUGS
  126. rwlock.c
  127. rwlock.h
  128. SERVER-TODO
  129. server.c
  130. server.h
  131. smalloc.c
  132. smalloc.h
  133. sprandom.c
  134. sprandom.h
  135. stat.c
  136. stat.h
  137. STEADYSTATE-TODO
  138. steadystate.c
  139. steadystate.h
  140. td_error.c
  141. td_error.h
  142. thread_options.h
  143. tickmarks.c
  144. tickmarks.h
  145. time.c
  146. trim.c
  147. trim.h
  148. verify-state.h
  149. verify.c
  150. verify.h
  151. workqueue.c
  152. workqueue.h
  153. zbd.c
  154. zbd.h
  155. zbd_types.h
  156. zone-dist.c
  157. zone-dist.h