All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wen Congyang <ghostwcy@gmail.com>
To: Max Reitz <mreitz@redhat.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	qemu-devl <qemu-devel@nongnu.org>, Jeff Cody <jcody@redhat.com>
Cc: Fam Zheng <famz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] refresh filename after the node is replaced
Date: Fri, 26 Jun 2015 22:27:02 +0800	[thread overview]
Message-ID: <558D6136.2090904@gmail.com> (raw)
In-Reply-To: <558D57D4.1090609@redhat.com>

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 <wency@cn.fujitsu.com>
>> ---
>>   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	other threads:[~2015-06-26 14:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25  6:41 [Qemu-devel] [PATCH] refresh filename after the node is replaced Wen Congyang
2015-06-26 13:47 ` Max Reitz
2015-06-26 14:27   ` Wen Congyang [this message]
2015-06-26 15:16     ` Max Reitz
2015-06-29  1:16       ` Wen Congyang
2015-06-30 13:17         ` Max Reitz
2015-07-01  1:08           ` Wen Congyang
2015-07-01 15:15             ` Max Reitz

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=558D6136.2090904@gmail.com \
    --to=ghostwcy@gmail.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wency@cn.fujitsu.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.