qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-io aborts at quit after reopen
@ 2017-04-25 15:13 Fam Zheng
  2017-04-25 15:57 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
  0 siblings, 1 reply; 2+ messages in thread
From: Fam Zheng @ 2017-04-25 15:13 UTC (permalink / raw)
  To: kwolf, qemu-devel; +Cc: qemu-block

Hi Kevin,

This happens both on master and on your block-next tree:

    $ qemu-io -f raw null-co:// -c 'reopen -r'
    Unexpected error in bdrv_check_perm() at /stor/work/qemu/block.c:1437:
    Block node is read-only
    Aborted

It seems bs->read_only and perms go out of sync when bdrv_reopen() toggles the
former.

Something is missing here?

Fam

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

* Re: [Qemu-devel] [Qemu-block] qemu-io aborts at quit after reopen
  2017-04-25 15:13 [Qemu-devel] qemu-io aborts at quit after reopen Fam Zheng
@ 2017-04-25 15:57 ` Alberto Garcia
  0 siblings, 0 replies; 2+ messages in thread
From: Alberto Garcia @ 2017-04-25 15:57 UTC (permalink / raw)
  To: Fam Zheng; +Cc: kwolf, qemu-devel, qemu-block

On Tue, Apr 25, 2017 at 11:13:17PM +0800, Fam Zheng wrote:
> Hi Kevin,
> 
> This happens both on master and on your block-next tree:
> 
>     $ qemu-io -f raw null-co:// -c 'reopen -r'
>     Unexpected error in bdrv_check_perm() at /stor/work/qemu/block.c:1437:
>     Block node is read-only
>     Aborted
> 
> It seems bs->read_only and perms go out of sync when bdrv_reopen()
> toggles the former.

It seems that the problem started in 8ee039951dea9a809e4745c42aebb4a7.

I just took a quick look at the code, but one difference is that
after this change bdrv_check_perm(old_bs, ...) is called before
QLIST_REMOVE(child, next_parent), so the returned perms are likely
different.

Berto

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

end of thread, other threads:[~2017-04-25 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25 15:13 [Qemu-devel] qemu-io aborts at quit after reopen Fam Zheng
2017-04-25 15:57 ` [Qemu-devel] [Qemu-block] " Alberto Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).