[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 8/9] mirror: use synch scheme for drive mirror

From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH 8/9] mirror: use synch scheme for drive mirror
Date: Wed, 15 Jun 2016 11:52:59 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 06/15/2016 07:18 AM, Eric Blake wrote:
On 06/14/2016 09:25 AM, Denis V. Lunev wrote:
Block commit of the active image to the backing store on a slow disk
could never end. For example with the guest with the following loop
     while true; do
         dd bs=1k count=1 if=/dev/zero of=x
running above slow storage could not complete the operation with a

resonable amount of time:

     virsh blockcommit rhel7 sda --active --shallow
     virsh qemu-monitor-event
     virsh qemu-monitor-command rhel7 \
           "arguments":{"device":"drive-scsi0-0-0-0"} }'
     virsh qemu-monitor-event
Completion event is never received.

This problem could not be fixed easily with the current architecture. We
should either prohibit guest writes (making dirty bitmap dirty) or switch
to the sycnchronous scheme.

This patch implements the latter. It adds mirror_before_write_notify
callback. In this case all data written from the guest is synchnonously

written to the mirror target. Though the problem is solved partially.
We should switch from bdrv_dirty_bitmap to simple hbitmap. This will be
done in the next patch.

In other words, the mere act of mirroring a guest will now be
guest-visible in that the guest is auto-throttled while waiting for the
mirroring to be written out.  It seems like you would want to be able to
opt in or out of this scheme.  Is it something that can be toggled
mid-operation (try asynchronous, and switch to synchronous if a timeout

Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy<address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Fam Zheng <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
CC: Jeff Cody <address@hidden>
CC: Eric Blake <address@hidden>
  block/mirror.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 78 insertions(+)

I'll leave the actual idea to others to review, because there may be
some ramifications that I'm not thinking of.

I would like to start the discussion with this series.
Yes, may be we need the policy and should switch
to synch scheme after the first stage of mirroring
(when 'complete' command is sent by the management

This could be done relatively easily on the base of this
patches. Really. Though I want to obtain some general
acceptance in advance.


P.S. Thank you very much for looking at this ;)

reply via email to

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