All of lore.kernel.org
 help / color / mirror / Atom feed
From: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
To: qemu devel <qemu-devel@nongnu.org>,
	Eric Blake <eblake@redhat.com>, Alberto Garcia <berto@igalia.com>,
	Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Dong Eddie <eddie.dong@intel.com>,
	Jiang Yunhong <yunhong.jiang@intel.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	Changlong Xie <xiecl.fnst@cn.fujitsu.com>,
	qemu block <qemu-block@nongnu.org>
Subject: [Qemu-devel] [PATCH v18 1/8] unblock backup operations in backing file
Date: Fri, 15 Apr 2016 16:10:31 +0800	[thread overview]
Message-ID: <1460707838-13510-2-git-send-email-xiecl.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1460707838-13510-1-git-send-email-xiecl.fnst@cn.fujitsu.com>

From: Wen Congyang <wency@cn.fujitsu.com>

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
---
 block.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/block.c b/block.c
index 4bdc6b3..1e5a4fd 100644
--- a/block.c
+++ b/block.c
@@ -1255,6 +1255,23 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd)
     /* Otherwise we won't be able to commit due to check in bdrv_commit */
     bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_COMMIT_TARGET,
                     bs->backing_blocker);
+    /*
+     * We do backup in 3 ways:
+     * 1. drive backup
+     *    The target bs is new opened, and the source is top BDS
+     * 2. blockdev backup
+     *    Both the source and the target are top BDSes.
+     * 3. internal backup(used for block replication)
+     *    Both the source and the target are backing file
+     *
+     * In case 1 and 2, neither the source nor the target is the backing file.
+     * In case 3, we will block the top BDS, so there is only one block job
+     * for the top BDS and its backing chain.
+     */
+    bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_BACKUP_SOURCE,
+                    bs->backing_blocker);
+    bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_BACKUP_TARGET,
+                    bs->backing_blocker);
 out:
     bdrv_refresh_limits(bs, NULL);
 }
-- 
1.9.3

  reply	other threads:[~2016-04-15  8:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15  8:10 [Qemu-devel] [PATCH v18 0/8] Block replication for continuous checkpoints Changlong Xie
2016-04-15  8:10 ` Changlong Xie [this message]
2016-04-15  8:10 ` [Qemu-devel] [PATCH v18 2/8] Backup: clear all bitmap when doing block checkpoint Changlong Xie
2016-04-15  8:10 ` [Qemu-devel] [PATCH v18 3/8] Link backup into block core Changlong Xie
2016-04-15  8:10 ` [Qemu-devel] [PATCH v18 4/8] docs: block replication's description Changlong Xie
2016-04-15  8:10 ` [Qemu-devel] [PATCH v18 5/8] auto complete active commit Changlong Xie
2016-04-15  8:10 ` [Qemu-devel] [PATCH v18 6/8] Introduce new APIs to do replication operation Changlong Xie
2016-04-15  8:10 ` [Qemu-devel] [PATCH v18 7/8] Implement new driver for block replication Changlong Xie
2016-05-06  9:13   ` Changlong Xie
2016-05-06 15:46   ` Stefan Hajnoczi
2016-05-10  9:49     ` Changlong Xie
2016-05-18  9:19     ` Changlong Xie
2016-05-18  9:23     ` [Qemu-devel] [RFC] backup: export interfaces for extra serialization Changlong Xie
2016-04-15  8:10 ` [Qemu-devel] [PATCH v18 8/8] support replication driver in blockdev-add Changlong Xie
2016-04-25  9:40 ` [Qemu-devel] [PATCH v18 0/8] Block replication for continuous checkpoints Changlong Xie
2016-05-05  7:18 ` Hailiang Zhang
2016-05-06 15:51 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-05-12  4:08   ` Changlong Xie

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=1460707838-13510-2-git-send-email-xiecl.fnst@cn.fujitsu.com \
    --to=xiecl.fnst@cn.fujitsu.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wency@cn.fujitsu.com \
    --cc=yunhong.jiang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.