qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Bug 1362635 <1362635@bugs.launchpad.net>
Cc: Fam Zheng <famz@redhat.com>, jsnow@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1362635] Re: bdrv_read co-routine re-entered recursively
Date: Mon, 1 Sep 2014 16:44:55 +0100	[thread overview]
Message-ID: <20140901154455.GD22346@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20140901075522.11915.55201.malone@chaenomeles.canonical.com>

[-- Attachment #1: Type: text/plain, Size: 1869 bytes --]

On Mon, Sep 01, 2014 at 07:55:22AM -0000, senya wrote:
> I'm trying to reanimate github.com/jagane/qemu-kvm-livebackup
> there is a separate thread which connects with client through socket and sends disk blocks to it.

Regarding your original question about threads: it is possible to do
block I/O from threads but there are rules about how to do that safely.
The natural way to do things in QEMU is not with threads, this was
always an issue with Jagane's patches (I guess he didn't want to spend
time integrating it into QEMU's main loop when prototyping the code but
it's not a good long-term solution).

More about livebackup:

There has been more recent work by Fam Zheng to achieve the same thing.
The advantage of Fam's approach is that it reuses existing QEMU
primitives instead of adding special case livebackup code.

Fam has moved on to other work but his latest patches are from May so
picking them up again shouldn't be that hard.

It consists of two things: image fleecing and dirty bitmap commands.

Image fleecing gives cheap access to a point-in-time snapshot of the
disk (over NBD).  Internally it uses the run-time NBD server and the
block-backup command to export a point-in-time snapshot.

The dirty bitmap provides what Jagane did but the plan is to also
persist bitmaps across QEMU shutdown.  This will make incremental
backups easy.

Please see Part IV of the "Block layer status report" presentation for
an overview:
http://www.linux-kvm.org/wiki/images/4/41/Kvm-forum-2013-block-layer-status-report.pdf

Here are Fam's patch series:
https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg03880.html
https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg05250.html

The first step is getting the image fleecing code merged.  Then the
in-memory dirty bitmap can be merged.  Finally, persistent dirty bitmap
support can be written.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-09-01 15:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 14:19 [Qemu-devel] [Bug 1362635] [NEW] bdrv_read co-routine re-entered recursively senya
2014-08-29 11:16 ` [Qemu-devel] [Bug 1362635] " senya
2014-08-29 15:54   ` Stefan Hajnoczi
2014-09-01  7:55 ` senya
2014-09-01 15:44   ` Stefan Hajnoczi [this message]
2014-09-01 13:38 ` senya
2014-09-08  8:01 ` senya
2014-09-08  9:54   ` Stefan Hajnoczi
2018-04-13 21:41 ` Thomas Huth

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=20140901154455.GD22346@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=1362635@bugs.launchpad.net \
    --cc=famz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).