On 23/05/19 04:07, Kevin Locke wrote: > The wording of the dd --help text suggests that output will be skipped > for sparse *input* blocks (i.e. that NUL-checking is done on input > blocks) while the code actually checks/skips all-NUL *output* blocks.[1] > Update the --help text to clarify this. > > Also update tests/dd/sparse.sh to ensure this is the case and prevent > regressions (since this would be easy to overlook in future changes). > > Motivation: Since NUL-checking is per-block, there is a tradeoff > between granularity of sparseness checking and I/O performance. It is > often desirable to have larger input blocks for better performance and > smaller output blocks for better sparseness checking. > > [1]: https://superuser.com/a/1136358
There is the argument that the sparse block size should be independent of both the input and output block sizes, to allow for efficiency on both the input and output. Perhaps cbs=N should be allowed to control that, given that sparse is a conv= option. Note also that cp sets the sparse block size independently of the i/o block size. Anyway that's for another patch, and the additional clarification in your patch is an improvement. Applied at: https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=3a87ad5 thanks! Pádraig
