Add dd sparse output mode

Review Request #662 - Created Sept. 15, 2017 and updated

Information
C Fraire
illumos-gate
8542
Reviewers
general
It would be convenient to have a conv=sparse mode for /usr/bin/dd akin to FreeBSD's and compatible with illumos's ostride mode.

N.b. the patch has many git-pbchk, cstyle fixes; but the effective changes are the new flsh2() and dd_close() functions and the two, new calls to the latter when reading input either has finished or produced an error.
* added dd_copy_test runner (and supporting scripts, bincomp and mkrandzero):
** regular-file dd for an input with no NUL bytes
** regular-file conv=sparse dd for an input with no NUL bytes
** regular-file dd for an input with some NUL bytes (random, but with certain, tail NUL blocks)
** regular-file conv=sparse dd for an input with some NUL bytes (random, but with certain, tail NUL blocks)
** regular-file dd for an input with all NUL bytes
** regular-file conv=sparse dd for an input with all NUL bytes
** same tests as above but for writing to a ZVOL
** same tests as above but for writing to a ZVOL in multiple passes using ostride
** same tests as above but for writing to a ZVOL in multiple passes using ostride with alternate block size

Issues

  • 0
  • 11
  • 4
  • 15
Description From Last Updated
Toomas Soome
Robert Mustacchi
Toomas Soome
Ship It!
Ken Mays
Ship It!
Loading...