All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Block patches
@ 2015-09-02 16:01 Stefan Hajnoczi
  2015-09-02 16:01 ` [Qemu-devel] [PULL 1/2] MAINTAINERS: add responsible person for Parallels format driver Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2015-09-02 16:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit 090d0bfd948343d522cd20bc634105b5cfe2483b:

  s390: fix softmmu compilation (2015-08-28 16:05:24 +0100)

are available in the git repository at:

  git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to e12f3784097a26a1ba51be420f41038b4c0ae5d1:

  block: more check for replaced node (2015-09-02 14:56:39 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Denis V. Lunev (1):
  MAINTAINERS: add responsible person for Parallels format driver

Wen Congyang (1):
  block: more check for replaced node

 MAINTAINERS           | 1 +
 block.c               | 5 +++--
 block/mirror.c        | 4 ++--
 blockdev.c            | 2 +-
 include/block/block.h | 3 ++-
 5 files changed, 9 insertions(+), 6 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PULL 1/2] MAINTAINERS: add responsible person for Parallels format driver
  2015-09-02 16:01 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
@ 2015-09-02 16:01 ` Stefan Hajnoczi
  2015-09-02 16:07   ` Eric Blake
  2015-09-02 16:01 ` [Qemu-devel] [PULL 2/2] block: more check for replaced node Stefan Hajnoczi
  2015-09-03 10:14 ` [Qemu-devel] [PULL 0/2] Block patches Peter Maydell
  2 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2015-09-02 16:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi, Denis V. Lunev

From: "Denis V. Lunev" <den@openvz.org>

Denis has spent 6 years working with this format in Parallels and QEMU
code was rewritten almost completely by his. Thus it would be quite
natural to add him as a maintainer and point of contact.

Patches are going to flow though Stefan's tree.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Message-id: 1440179056-12934-1-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 08f356a..a4ea7c3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1307,6 +1307,7 @@ F: block/dmg.c
 
 parallels
 M: Stefan Hajnoczi <stefanha@redhat.com>
+M: Denis V. Lunev <den@openvz.org>
 L: qemu-block@nongnu.org
 S: Supported
 F: block/parallels.c
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PULL 2/2] block: more check for replaced node
  2015-09-02 16:01 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
  2015-09-02 16:01 ` [Qemu-devel] [PULL 1/2] MAINTAINERS: add responsible person for Parallels format driver Stefan Hajnoczi
@ 2015-09-02 16:01 ` Stefan Hajnoczi
  2015-09-03 10:14 ` [Qemu-devel] [PULL 0/2] Block patches Peter Maydell
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2015-09-02 16:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

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

We use mirror+replace to fix quorum's broken child. bs/s->common.bs
is quorum, and to_replace is the broken child. The new child is target_bs.
Without this patch, the replace node can be any node, and it can be
top BDS with BB, or another quorum's child. We just check if the broken
child is part of the quorum BDS in this patch.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Message-id: 55A86486.1000404@cn.fujitsu.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 block.c               | 5 +++--
 block/mirror.c        | 4 ++--
 blockdev.c            | 2 +-
 include/block/block.h | 3 ++-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/block.c b/block.c
index d088ee0..090923c 100644
--- a/block.c
+++ b/block.c
@@ -4077,7 +4077,8 @@ bool bdrv_is_first_non_filter(BlockDriverState *candidate)
     return false;
 }
 
-BlockDriverState *check_to_replace_node(const char *node_name, Error **errp)
+BlockDriverState *check_to_replace_node(BlockDriverState *parent_bs,
+                                        const char *node_name, Error **errp)
 {
     BlockDriverState *to_replace_bs = bdrv_find_node(node_name);
     AioContext *aio_context;
@@ -4100,7 +4101,7 @@ BlockDriverState *check_to_replace_node(const char *node_name, Error **errp)
      * Another benefit is that this tests exclude backing files which are
      * blocked by the backing blockers.
      */
-    if (!bdrv_is_first_non_filter(to_replace_bs)) {
+    if (!bdrv_recurse_is_first_non_filter(parent_bs, to_replace_bs)) {
         error_setg(errp, "Only top most non filter can be replaced");
         to_replace_bs = NULL;
         goto out;
diff --git a/block/mirror.c b/block/mirror.c
index 9474443..a258926 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -644,9 +644,9 @@ static void mirror_complete(BlockJob *job, Error **errp)
     if (s->replaces) {
         AioContext *replace_aio_context;
 
-        s->to_replace = check_to_replace_node(s->replaces, &local_err);
+        s->to_replace = bdrv_find_node(s->replaces);
         if (!s->to_replace) {
-            error_propagate(errp, local_err);
+            error_setg(errp, "Node name '%s' not found", s->replaces);
             return;
         }
 
diff --git a/blockdev.c b/blockdev.c
index 4125ff6..6b48be6 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2760,7 +2760,7 @@ void qmp_drive_mirror(const char *device, const char *target,
             goto out;
         }
 
-        to_replace_bs = check_to_replace_node(replaces, &local_err);
+        to_replace_bs = check_to_replace_node(bs, replaces, &local_err);
 
         if (!to_replace_bs) {
             error_propagate(errp, local_err);
diff --git a/include/block/block.h b/include/block/block.h
index 37916f7..608cd4e 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -317,7 +317,8 @@ bool bdrv_recurse_is_first_non_filter(BlockDriverState *bs,
 bool bdrv_is_first_non_filter(BlockDriverState *candidate);
 
 /* check if a named node can be replaced when doing drive-mirror */
-BlockDriverState *check_to_replace_node(const char *node_name, Error **errp);
+BlockDriverState *check_to_replace_node(BlockDriverState *parent_bs,
+                                        const char *node_name, Error **errp);
 
 /* async block I/O */
 typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector,
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PULL 1/2] MAINTAINERS: add responsible person for Parallels format driver
  2015-09-02 16:01 ` [Qemu-devel] [PULL 1/2] MAINTAINERS: add responsible person for Parallels format driver Stefan Hajnoczi
@ 2015-09-02 16:07   ` Eric Blake
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2015-09-02 16:07 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Peter Maydell, Denis V. Lunev

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

On 09/02/2015 10:01 AM, Stefan Hajnoczi wrote:
> From: "Denis V. Lunev" <den@openvz.org>
> 
> Denis has spent 6 years working with this format in Parallels and QEMU
> code was rewritten almost completely by his. Thus it would be quite

s/his/him/ - if it is not too late.

> natural to add him as a maintainer and point of contact.
> 
> Patches are going to flow though Stefan's tree.
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Message-id: 1440179056-12934-1-git-send-email-den@openvz.org
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  MAINTAINERS | 1 +
>  1 file changed, 1 insertion(+)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] Block patches
  2015-09-02 16:01 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
  2015-09-02 16:01 ` [Qemu-devel] [PULL 1/2] MAINTAINERS: add responsible person for Parallels format driver Stefan Hajnoczi
  2015-09-02 16:01 ` [Qemu-devel] [PULL 2/2] block: more check for replaced node Stefan Hajnoczi
@ 2015-09-03 10:14 ` Peter Maydell
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2015-09-03 10:14 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 2 September 2015 at 17:01, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 090d0bfd948343d522cd20bc634105b5cfe2483b:
>
>   s390: fix softmmu compilation (2015-08-28 16:05:24 +0100)
>
> are available in the git repository at:
>
>   git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to e12f3784097a26a1ba51be420f41038b4c0ae5d1:
>
>   block: more check for replaced node (2015-09-02 14:56:39 +0100)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-03 10:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 16:01 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
2015-09-02 16:01 ` [Qemu-devel] [PULL 1/2] MAINTAINERS: add responsible person for Parallels format driver Stefan Hajnoczi
2015-09-02 16:07   ` Eric Blake
2015-09-02 16:01 ` [Qemu-devel] [PULL 2/2] block: more check for replaced node Stefan Hajnoczi
2015-09-03 10:14 ` [Qemu-devel] [PULL 0/2] Block patches Peter Maydell

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.