[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 2/3] block: assign backing relationship in drive
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [RFC PATCH 2/3] block: assign backing relationship in drive-backup |
Date: |
Wed, 26 Jun 2013 11:59:20 +0800 |
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 <address@hidden>
---
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
- [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup, Fam Zheng, 2013/06/26
- [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command, Fam Zheng, 2013/06/26
- Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command, Stefan Hajnoczi, 2013/06/27
- Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command, Fam Zheng, 2013/06/27
- Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command, Paolo Bonzini, 2013/06/27
- Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command, Fam Zheng, 2013/06/27
- Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command, Paolo Bonzini, 2013/06/27
- Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command, Fam Zheng, 2013/06/27
[Qemu-devel] [RFC PATCH 2/3] block: assign backing relationship in drive-backup,
Fam Zheng <=
[Qemu-devel] [RFC PATCH 3/3] nbd: don't get ref if bs has no drive, Fam Zheng, 2013/06/26
Re: [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup, Paolo Bonzini, 2013/06/26