coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] dd: Clarify sparse detection is by *output* block


From: Pádraig Brady
Subject: Re: [PATCH] dd: Clarify sparse detection is by *output* block
Date: Sun, 26 May 2019 12:56:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]