On 04/24/2012 12:53 PM, Bernhard Voelker wrote:
> 
> 
> On 04/24/2012 01:15 PM, Pádraig Brady wrote:
>>> With those changes, the affected files are then very compressible.
>>>> With some file system types/options, won't they occupy far fewer
>>>> blocks than before?
>> Good point.
>> The dd/sparse one could then fail the alloc check.
>> The fiemap-empty change is only 5120 bytes too.
> 
> Wouldn't
> 
> -dd count=10 if=/dev/urandom conv=notrunc iflag=fullblock 
> of=unwritten.withdata
> +dd count=10 if=/dev/zero | sed 's/\(.\)./\1 /g' | dd conv=notrunc 
> of=unwritten.withdata
> 
> defeat the compression logic?

You'd have to be approaching random to avoid compression.

$ dd count=10 if=/dev/zero | tr '\0' 1 | gzip -c | wc -c
41

$ dd count=10 if=/dev/zero | sed 's/\(.\)./\1 /g' | gzip -c | wc -c
41

cheers,
Pádraig.

Reply via email to