From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, obarenbo@redhat.com,
roliveri@redhat.com, hbrock@redhat.com, rjones@redhat.com,
armbru@redhat.com, pmyers@redhat.com, imain@redhat.com,
stefanha@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [RFC PATCH 2/3] block: assign backing relationship in drive-backup
Date: Wed, 26 Jun 2013 11:59:20 +0800 [thread overview]
Message-ID: <1372219161-12209-3-git-send-email-famz@redhat.com> (raw)
In-Reply-To: <1372219161-12209-1-git-send-email-famz@redhat.com>
Assign source image as the backing hd of target bs, so reading target bs
gets the point-in-time copy of data from source image.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
blockdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index 5e694f3..a1d816e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1504,6 +1504,10 @@ void qmp_drive_backup(const char *device, const char *target,
return;
}
+ target_bs->backing_hd = bs;
+ pstrcpy(target_bs->backing_file, sizeof(target_bs->backing_file),
+ bs->filename);
+
backup_start(bs, target_bs, speed, on_source_error, on_target_error,
block_job_cb, bs, &local_err);
if (local_err != NULL) {
--
1.8.3.1
next prev parent reply other threads:[~2013-06-26 4:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 3:59 [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup Fam Zheng
2013-06-26 3:59 ` [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command Fam Zheng
2013-06-27 8:15 ` Stefan Hajnoczi
2013-06-27 9:41 ` Fam Zheng
2013-06-27 10:57 ` Paolo Bonzini
2013-06-27 11:37 ` Fam Zheng
2013-06-27 11:40 ` Paolo Bonzini
2013-06-28 2:17 ` Fam Zheng
2013-06-26 3:59 ` Fam Zheng [this message]
2013-06-26 7:15 ` [Qemu-devel] [RFC PATCH 2/3] block: assign backing relationship in drive-backup Paolo Bonzini
2013-06-26 3:59 ` [Qemu-devel] [RFC PATCH 3/3] nbd: don't get ref if bs has no drive Fam Zheng
2013-06-26 7:23 ` [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup Paolo Bonzini
2013-06-26 7:31 ` Fam Zheng
2013-06-27 8:17 ` Stefan Hajnoczi
2013-06-27 10:06 ` Paolo Bonzini
2013-06-27 13:39 ` Stefan Hajnoczi
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=1372219161-12209-3-git-send-email-famz@redhat.com \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=hbrock@redhat.com \
--cc=imain@redhat.com \
--cc=kwolf@redhat.com \
--cc=obarenbo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pmyers@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=roliveri@redhat.com \
--cc=stefanha@redhat.com \
/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).