From: Paolo Bonzini <pbonzini@redhat.com>
To: Wolfgang Richter <wolf@cs.cmu.edu>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>, imain <imain@redhat.com>,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH] drive-backup 'stream' mode
Date: Tue, 15 Oct 2013 09:26:37 +0200 [thread overview]
Message-ID: <525CEE2D.10505@redhat.com> (raw)
In-Reply-To: <CACO=3k7ammSaNQJ6tzuXyQnD9SQcW-eeKcKiL3puJr78UhL+tQ@mail.gmail.com>
Il 14/10/2013 22:10, Wolfgang Richter ha scritto:
> Okay, I think my impression might be wrong, but I thought
> 'drive-mirror' would become deprecated with the new 'drive-backup'
> command and code.
>
> If we look at what they do (current documentation and code),
> 'drive-backup' AFAIK behaves the same for all modes of 'drive-mirror'
> _except_ mode 'none' with _better_ consistency guarantees. That is,
> 'drive-backup' clearly provides a point-in-time snapshot, whereas
> 'drive-mirror' may create a point-in-time snapshot, but it can not
> guarantee that.
They are different.
drive-backup provides a point-in-time snapshot at the time the job is
started. Completing the job stops writing to the target.
drive-mirror provides a copy at the time the job is completed.
Completing the job stops writing to the source.
> In addition, 'drive-backup's code is cleaner, simpler, and easier to
> work with (in my opinion) than 'drive-mirror's code. This is because
> of the new hooks in block.c for tracked requests etc. so that the job
> can insert code to be run on every write in a clean manner (I think).
The simpler code for drive-backup is because it doesn't have performance
requirements. drive-mirror has to be optimized because otherwise too
many dirty sectors pile up and the job doesn't converge. drive-backup
runs synchronously as the VM writes to the disk.
Using the hooks in block.c we can change drive-mirror to use an "active"
(but still asynchronous) approach as long as the in-flight I/O does not
exceed the size of the drive-mirror buffer. This would not simplify the
code however, it would only guarantee that I/Os are performed in the
same order as the original operations issued by the VM.
Paolo
next prev parent reply other threads:[~2013-10-15 7:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 15:18 [Qemu-devel] [RFC PATCH] drive-backup 'stream' mode Wolfgang Richter
2013-10-11 15:38 ` Eric Blake
2013-10-14 20:10 ` Wolfgang Richter
2013-10-14 20:24 ` Eric Blake
2013-10-15 7:26 ` Paolo Bonzini [this message]
2013-10-12 5:47 ` Fam Zheng
2013-10-14 20:14 ` Wolfgang Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=525CEE2D.10505@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=imain@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=wolf@cs.cmu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).