[libvirt] [PATCHv4 03/15] qemu: improve efficiency of dd during snapshots

Eric Blake eblake at redhat.com
Tue Mar 15 22:40:33 UTC 2011


On 03/10/2011 04:59 AM, Daniel P. Berrange wrote:
> On Wed, Mar 09, 2011 at 06:45:43PM -0700, Eric Blake wrote:
>> POSIX states about dd:
>>
>> If the bs=expr operand is specified and no conversions other than
>> sync, noerror, or notrunc are requested, the data returned from each
>> input block shall be written as a separate output block; if the read
>> returns less than a full block and the sync conversion is not
>> specified, the resulting output block shall be the same size as the
>> input block. If the bs=expr operand is not specified, or a conversion
>> other than sync, noerror, or notrunc is requested, the input shall be
>> processed and collected into full-sized output blocks until the end of
>> the input is reached.
>>
>> Since we aren't using conv=sync, there is no zero-padding, but our
>> use of bs= means that a short read results in a short write.  If
>> instead we use ibs= and obs=, then short reads are collected and dd
>> only has to do a single write, which can make dd more efficient.
>>
>> * src/qemu/qemu_monitor.c (qemuMonitorMigrateToFile):
>> Avoid 'dd bs=', since it can cause short writes.
>> ---
>>  src/qemu/qemu_monitor.c |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> ACK

Thanks; applied.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110315/252b511f/attachment-0001.sig>


More information about the libvir-list mailing list