qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] refresh filename after the node is replaced


From: Wen Congyang
Subject: Re: [Qemu-devel] [PATCH] refresh filename after the node is replaced
Date: Fri, 26 Jun 2015 22:27:02 +0800
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

At 2015/6/26 21:47, Max Reitz Wrote:
On 25.06.2015 08:41, Wen Congyang wrote:
We can use block job mirror to repair broken quorum files. But the
command
'info block' doesn't output correct filename after block job mirror
finishes.

Which filename? The quorum filename is broken after this patch, too. In

In my test, quorum has two children, s->common.bs->drv is quorum, and s->to_replace is one of his child. Without this patch, info block will output obsolete information. With this patch, the quorum's filename is right. I don't know why quorum filename
is broken.

Thanks
Wen Congyang

order to fix this, we need to call bdrv_refresh_filename() after
bdrv_swap() on all BDSs which reference one of the swapped BDSs. I think
this will not be reasonably possible until Kevin's "bdrv_reopen()
overhaul" series is merged which introduces a generic parent-child
relationship for BDSs.

Max

Signed-off-by: Wen Congyang <address@hidden>
---
  block/mirror.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/block/mirror.c b/block/mirror.c
index 8aa2b21..2ca2c21 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -351,6 +351,9 @@ static void mirror_exit(BlockJob *job, void *opaque)
              bdrv_set_backing_hd(s->base, NULL);
              bdrv_unref(p);
          }
+        if (s->to_replace != s->common.bs) {
+            bdrv_refresh_filename(s->common.bs);
+        }
      }
      if (s->to_replace) {
          bdrv_op_unblock_all(s->to_replace, s->replace_blocker);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]