Skip to contentSkip to conversation

qemu-io aborts at quit after reopen

Qemu-devel Fam Zheng 2 participants 2 messages Apr 25, 2017

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

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

#1 lore raw
Quoted 11 lines · Fam Zheng

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